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
I'm now running the command with command line args generate-completion:
While I expected to get the completion script as output, I was confronted with the following error message:
$ java GenerateCompletionParametersTest generate-completion
Missing required option 'params[0..*]=<file>'
Usage: CompletionTest <file> <file>... [COMMAND]
<file> <file>...
Commands:
generate-completion Generate bash/zsh completion script for CompletionTest.
help Displays help information about the specified command
While the error message is clear, it took me quite some time to realize what's wrong here:
Required parameters are enforced, so in order to get the completion script as output, you actually have to specify the required parameters:
This behaviour looks really weird to me. For my understanding the built-in subcommand generate-completion should be treated equal to the help subcommand. Parameters are not enforced when requesting usage help, and from my point of view, they shouldn't enforced when requesting the completion script via the built in subcommand either. From my point of view enforcing the parameters is not what the user expexts here.
What do you think?
The text was updated successfully, but these errors were encountered:
I'm using the GenerateCompletion subcommand introduced with picocli 4.1 and stumbled across the following issue:
Minimum example
I'm now running the command with command line args
generate-completion
:While I expected to get the completion script as output, I was confronted with the following error message:
While the error message is clear, it took me quite some time to realize what's wrong here:
Required parameters are enforced, so in order to get the completion script as output, you actually have to specify the required parameters:
This behaviour looks really weird to me. For my understanding the built-in subcommand
generate-completion
should be treated equal to thehelp
subcommand. Parameters are not enforced when requesting usage help, and from my point of view, they shouldn't enforced when requesting the completion script via the built in subcommand either. From my point of view enforcing the parameters is not what the user expexts here.What do you think?
The text was updated successfully, but these errors were encountered: