在jshell中创建自定义反馈模式 [英] Create custom feedback mode in jshell

查看:87
本文介绍了在jshell中创建自定义反馈模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据jshell中/set反馈的文档,有以下内置模式:

As from the documentation of /set feedback in jshell, there are following built-in modes:

verbose, normal, concise, and silent

是否可以创建具有简洁和静音功能的反馈模式?或者我们可以更改以上任何一种模式? 还是我们可以创建自己的自定义反馈模式?

Is it possible to create a feedback mode with the functionality of both concise and silent? Or we can change any one of the above mode? Or can we create our own custom feedback mode?

推荐答案

您可以使用以下命令创建自己的自定义反馈模式:

You can create your own custom feedback mode using the command:

/set mode <your-mode-name> -command|-quiet

,其中-command选项表示您需要命令反馈.如果您不希望命令描述发生的操作,请使用-quiet而不是-command.

where the -command option indicates that you want command feedback. If you don't want commands to describe the action that occurred, then use -quiet instead of -command.

如果要复制现有模式,可以按照以下步骤操作:

If you want to copy an existing mode, you can do that as:

/set mode <your-mode-name> <existing-mode-name> -command|-quiet

例如

/set mode samplemode concise -command

为了合并两者的功能,您可能必须在命令行中编辑最初未从中复制属性的属性.

In order to merge the functionality of both, you might have to edit the attributes from the command line for one that you didn't initially copy from.

这篇关于在jshell中创建自定义反馈模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆