mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 06:44:16 +00:00
ea264fde16
Early in the Bash-completion script, we build up a string that identifies the command or subcommand. When we see the top-level command's name (e.g. `git`) we set the command so far to that value. We do that regardless of where in the argument list it appears. For example, if the argument list is `git diff git`, we set the current command to `git` when run into it the second time. We therefore suggest arguments to the top-level command afterwards, which is not correct. This patch fixes that by also considering the string that identifies the command so far, so we only set the overall command to `git` if the command so far is the empty string. This is actually just a step on the way to getting completion to work for aliases of subcommands. Closes #4273 |
||
---|---|---|
.. | ||
examples | ||
src | ||
tests | ||
Cargo.toml | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
README.md |
clap_complete
Shell completion generation for
clap
Dual-licensed under Apache 2.0 or MIT.
About
Related Projects
- clap_complete_fig for fig shell completion support