mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 06:44:16 +00:00
test(complete): Include a visible command alias
Only zsh includes completion for visible aliases of subcommands. Let's show that in tests.
This commit is contained in:
parent
5020d739d5
commit
8d0ef124e0
2 changed files with 2 additions and 0 deletions
|
@ -151,6 +151,7 @@ pub fn sub_subcommands_command(name: &'static str) -> clap::Command {
|
|||
feature_sample_command(name).subcommand(
|
||||
clap::Command::new("some_cmd")
|
||||
.about("top level subcommand")
|
||||
.visible_alias("some_cmd_alias")
|
||||
.subcommand(
|
||||
clap::Command::new("sub_cmd").about("sub-subcommand").arg(
|
||||
clap::Arg::new("config")
|
||||
|
|
|
@ -151,6 +151,7 @@ _my-app_commands() {
|
|||
local commands; commands=(
|
||||
'test:tests things' \
|
||||
'some_cmd:top level subcommand' \
|
||||
'some_cmd_alias:top level subcommand' \
|
||||
'help:Print this message or the help of the given subcommand(s)' \
|
||||
)
|
||||
_describe -t commands 'my-app commands' commands "$@"
|
||||
|
|
Loading…
Reference in a new issue