src/cli/command.rs - get_nested_completion: return nothing if first argument does not match

This commit is contained in:
Dietmar Maurer 2019-12-01 10:24:07 +01:00
parent 309e449db2
commit 9498fcf9c5
1 changed files with 1 additions and 0 deletions

View File

@ -286,6 +286,7 @@ pub fn get_nested_completion(
if let Some(sub_cmd) = map.commands.get(first) {
return get_nested_completion(sub_cmd, &args[1..]);
}
return Vec::new();
}
let mut completions = Vec::new();
for cmd in map.commands.keys() {