src/cli/command.rs - get_nested_completion: return nothing if first argument does not match
This commit is contained in:
parent
309e449db2
commit
9498fcf9c5
|
@ -286,6 +286,7 @@ pub fn get_nested_completion(
|
||||||
if let Some(sub_cmd) = map.commands.get(first) {
|
if let Some(sub_cmd) = map.commands.get(first) {
|
||||||
return get_nested_completion(sub_cmd, &args[1..]);
|
return get_nested_completion(sub_cmd, &args[1..]);
|
||||||
}
|
}
|
||||||
|
return Vec::new();
|
||||||
}
|
}
|
||||||
let mut completions = Vec::new();
|
let mut completions = Vec::new();
|
||||||
for cmd in map.commands.keys() {
|
for cmd in map.commands.keys() {
|
||||||
|
|
Loading…
Reference in New Issue