Hidden Command
你可以 hide 命令,在命令尚未完全准备就绪、用于调试目的或者你有不想宣扬其存在的其他任何理由的情况下,这是很方便的。
It is possible to hide a command which is convenient in cases where it is not yet ready for prime time, is meant for debugging purposes or you have any other reason you dont want to advertise its presense.
如果你知道命令及其选项,则可以执行隐藏的命令。实际上,它从下列内容中被移除:
Hidden command can be executed if you know it and its options. It is effectively removed from:
-
Help listing
-
Help page for command return "unknown command"
-
Command completion in interactive mode
-
Bash completion
以下是定义命令为 hidden 的示例。它展示了用于定义 hidden 状态的可用构建器方法。
Below is an example how to define command as hidden. It shows available builder methods to define hidden state.
Unresolved include directive in modules/ROOT/pages/commands/hidden.adoc - include::../../test/java/org/springframework/shell/docs/CommandRegistrationHiddenSnippets.java[]
注解基础配置不支持定义隐藏命令 |
Defining hidden commands is not supported with annotation based configuration |