From 9498fcf9c56ea4f788928e70be4698d556b808bf Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Sun, 1 Dec 2019 10:24:07 +0100 Subject: [PATCH] src/cli/command.rs - get_nested_completion: return nothing if first argument does not match --- src/cli/command.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cli/command.rs b/src/cli/command.rs index ed7f3e28..c66849df 100644 --- a/src/cli/command.rs +++ b/src/cli/command.rs @@ -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() {