You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Usage: Completion [COMMAND]
Commands:
help Displays help information about the specified command
Subcommand generate-completion is ommited from the command list, as requested in code.
No, remove comment in line 12 and comment out line 11. Run again, this time you are getting as output:
Unmatched argument at index 0: 'ge'
Did you mean: generate-completion?
What puzzles me here:
If one wants to omit the subcommand from the usage help message, there is most likely a good reason for this. However, the suggestion for completion now exactly shows the subcommand that is supposed to be hidden from the usage help, which might be unwanted. IMHO, it were better here to exclude the generate-completion subcommand from the suggestions given. The same is true for tab completion that can be put in place for the command: here, once the user presses TAB after typing in the command name, the subcommand generate-completionis printed out as suggested command, too:
$ MyCommand
generate-completion help
Bug or feature? What do you think?
The text was updated successfully, but these errors were encountered:
It makes sense to exclude hidden subcommands from auto-completion or unmatched argument suggestions. Currently neither auto-completion nor the unmatched argument suggestions take hidden into account (for subcommands, but also for options and positional parameters)...
Perhaps it should be configurable, where the default is that hidden options/subcommands are not suggested, but applications who like the previous behaviour can get it if they want.
Minimal example
If I run this, I'm getting:
Subcommand
generate-completion
is ommited from the command list, as requested in code.No, remove comment in line 12 and comment out line 11. Run again, this time you are getting as output:
What puzzles me here:
If one wants to omit the subcommand from the usage help message, there is most likely a good reason for this. However, the suggestion for completion now exactly shows the subcommand that is supposed to be hidden from the usage help, which might be unwanted. IMHO, it were better here to exclude the
generate-completion
subcommand from the suggestions given. The same is true for tab completion that can be put in place for the command: here, once the user presses TAB after typing in the command name, the subcommandgenerate-completion
is printed out as suggested command, too:Bug or feature? What do you think?
The text was updated successfully, but these errors were encountered: