mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 06:44:16 +00:00
parent
82c93ce024
commit
017c258be1
2 changed files with 5 additions and 2 deletions
|
@ -63,7 +63,7 @@ pub fn complete(
|
|||
if let Ok(value) = arg.to_value() {
|
||||
if let Some(next_cmd) = current_cmd.find_subcommand(value) {
|
||||
current_cmd = next_cmd;
|
||||
pos_index = 0;
|
||||
pos_index = 1;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,7 +113,10 @@ fn suggest_subcommand_positional() {
|
|||
|
||||
snapbox::assert_eq(
|
||||
"--help\tPrint help (see more with '--help')
|
||||
-h\tPrint help (see more with '--help')",
|
||||
-h\tPrint help (see more with '--help')
|
||||
hello-world\tSay hello to the world
|
||||
hello-moon
|
||||
goodbye-world",
|
||||
complete!(cmd, "hello-world [TAB]"),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue