New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command usage displayed incorrectly #1165
Labels
Comments
How does a |
dualspiral
added a commit
that referenced
this issue
Dec 17, 2017
One of the long standing issues with the Command API is that subcommands don't give useful feedback if a command fails. The current implementation of the command system is difficult to solve this effectively with - this is a best effort. It isn't breaking, but in order to activate behaviour where a subcommand failing gives meaningful usage requires "childArgumentParseExceptionFallback" on the CommandSpec builder to be false. It defaults to true, the current behaviour. Any plugin that doesn't use this method in the builder will get the old behaviour. Fixes #1165, fixes #1272, fixes #1542, fixes #1647
dualspiral
added a commit
that referenced
this issue
Dec 17, 2017
One of the long standing issues with the Command API is that subcommands don't give useful feedback if a command fails. The current implementation of the command system is difficult to solve this effectively with - this is a best effort. It isn't breaking, but in order to activate behaviour where a subcommand failing gives meaningful usage requires "childArgumentParseExceptionFallback" on the CommandSpec builder to be false. It defaults to true, the current behaviour. Any plugin that doesn't use this method in the builder will get the old behaviour. Fixes #1165, fixes #1272, fixes #1542, fixes #1647
dualspiral
added a commit
that referenced
this issue
Dec 20, 2017
One of the long standing issues with the Command API is that subcommands don't give useful feedback if a command fails. The current implementation of the command system is difficult to solve this effectively with - this is a best effort. It isn't breaking, but in order to activate behaviour where a subcommand failing gives meaningful usage requires "childArgumentParseExceptionFallback" on the CommandSpec builder to be false. It defaults to true, the current behaviour. Any plugin that doesn't use this method in the builder will get the old behaviour. Fixes #1165, fixes #1272, fixes #1542, fixes #1647
dualspiral
added a commit
that referenced
this issue
Dec 20, 2017
One of the long standing issues with the Command API is that subcommands don't give useful feedback if a command fails. The current implementation of the command system is difficult to solve this effectively with - this is a best effort. It isn't breaking, but in order to activate behaviour where a subcommand failing gives meaningful usage requires "childArgumentParseExceptionFallback" on the CommandSpec builder to be false. It defaults to true, the current behaviour. Any plugin that doesn't use this method in the builder will get the old behaviour. Fixes #1165, fixes #1272, fixes #1542, fixes #1647
In the latest SF for API 7 snapshot, I've added method |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Command arguments for sub-commands do not display at all in the help message when a user types in a sub-command without the required arguments. A detailed explanation can be found below.
Command
/main
has a sub-commandset
. The sub-commandset
has a required argument, calledarg1
. Running/main set
, without submitting the required argument, displays an unhelpful usage message:Usage: /main set
. It fails to display the required argument,arg1
in the usage message.The command was created by implementing the
CommandExecutor
and registering aCommandSpec
.The text was updated successfully, but these errors were encountered: