improve completion

This commit is contained in:
Dietmar Maurer 2018-12-12 13:00:58 +01:00
parent e3d40bb8cd
commit 7f4e639b37

View File

@ -144,11 +144,8 @@ fn print_simple_completion(
args.remove(0);
print_simple_completion(cli_cmd, done, &arg_param[1..], args);
return;
}
if let Some((_, schema)) = cli_cmd.info.parameters.properties.get(prop_name) {
if args.is_empty() {
print_property_completion(schema, prop_name, &cli_cmd.completion_functions, "");
} else {
} else if args.len() == 1 {
if let Some((_, schema)) = cli_cmd.info.parameters.properties.get(prop_name) {
print_property_completion(schema, prop_name, &cli_cmd.completion_functions, &args[0]);
}
}