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
As it currently stands, although a command can designate its default subcommand and argument parsing works correctly, there is no completion for arguments, options, or flags of the subcommand unless the subcommand name is specified — which eliminates much of the convenience of having a default subcommand. I'd like it if the completion for the default subcommand was added to the list of all subcommands as the completion for the super command.
$ greeter informal --f<Tab> # successfully completes to the below line
$ greeter informal --firstName
$ greeter formal --f<Tab> # successfully completes to the below line
$ greeter formal --fullName
# here's the problem
$ greeter <Tab> # lists the following completions
--help -h formal help informal
$ greeter --f<Tab> # no completions
Instead, I would like greeter <Tab> to list all subcommands (as it currently does) and all the completions for its default command, so:
$ greeter <Tab>
--first-name --help -h formal help informal
For backwards compatibility and user configurability, it might make sense to make this an optional parameter to the @Argument/@Option/@Flag initializer (or perhaps CompletionKind?)
Footnotes
I made up this code sample because the project I was working on when I found this error is more complex, but this should get the point across ↩
The text was updated successfully, but these errors were encountered:
As it currently stands, although a command can designate its default subcommand and argument parsing works correctly, there is no completion for arguments, options, or flags of the subcommand unless the subcommand name is specified — which eliminates much of the convenience of having a default subcommand. I'd like it if the completion for the default subcommand was added to the list of all subcommands as the completion for the super command.
Here's an example1:
Here's what happens if you run it:
Instead, I would like
greeter <Tab>
to list all subcommands (as it currently does) and all the completions for its default command, so:For backwards compatibility and user configurability, it might make sense to make this an optional parameter to the
@Argument
/@Option
/@Flag
initializer (or perhapsCompletionKind
?)Footnotes
I made up this code sample because the project I was working on when I found this error is more complex, but this should get the point across ↩
The text was updated successfully, but these errors were encountered: