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
My console tool has several global options, such as the defaults like --ansi or --help, and some of my custom arguments have their own specific options that are only available to them.
I've noticed that if I specify a global option immediately after the console tool name, linus in this case, and then attempt to get tab completion for an option against the argument name that follows, the completion suggestions only include the global ones, and ignore the specific ones specific to the argument name. However, if I move the global option after the argument name, I get tab completion for all possible options, both global, and more importantly, the specific ones that are available to the argument name.
See the following output as an example of the difference between the completion suggestions when a global option is passed immediately after the console tool name, and then when a global option is passed immediately after the argument name:
Notice that in the first ouput I'm not provided a suggestion to use the --merge-develop or --no-integrity-check options, and only see the global options, while in the second output, I see all the global options as well as the specific options for the given argument name.
Has anyone else noticed this?
The text was updated successfully, but these errors were encountered:
danemacmillan
changed the title
Specifiying short option immediately after command prevents specific long options for arguments
Specifiying global option immediately after console name prevents specific long options for arguments from completing
Feb 21, 2018
The CompletionHandler code made an assumption that the command name
was always the second word on the command line:
$ [program-name] [command-name] [...arguments and options]
This now searches for the first non-option-like word and stores its
index for other parts of CompletionHandler to test against.
The way ArrayInput is built in `CompletionHandler::getInput()` doesn't
align with how the docs for that class expect it to be used, so calling
`getFirstArgument()` was always returning the first value.
Fixes#83
My console tool has several global options, such as the defaults like
--ansi
or--help
, and some of my custom arguments have their own specific options that are only available to them.I've noticed that if I specify a global option immediately after the console tool name,
linus
in this case, and then attempt to get tab completion for an option against the argument name that follows, the completion suggestions only include the global ones, and ignore the specific ones specific to the argument name. However, if I move the global option after the argument name, I get tab completion for all possible options, both global, and more importantly, the specific ones that are available to the argument name.See the following output as an example of the difference between the completion suggestions when a global option is passed immediately after the console tool name, and then when a global option is passed immediately after the argument name:
Notice that in the first ouput I'm not provided a suggestion to use the
--merge-develop
or--no-integrity-check
options, and only see the global options, while in the second output, I see all the global options as well as the specific options for the given argument name.Has anyone else noticed this?
The text was updated successfully, but these errors were encountered: