src/cli/command.rs - get_nested_completion: allow fuzzy match

This commit is contained in:
Dietmar Maurer 2019-12-01 11:06:54 +01:00
parent 9498fcf9c5
commit fb8a00bc00

View File

@ -283,7 +283,7 @@ pub fn get_nested_completion(
}
let first = &args[0];
if args.len() > 1 {
if let Some(sub_cmd) = map.commands.get(first) {
if let Some((_, sub_cmd)) = map.find_command(first) {
return get_nested_completion(sub_cmd, &args[1..]);
}
return Vec::new();