diff --git a/src/cli/command.rs b/src/cli/command.rs index 3604b0f5..d51c4fb1 100644 --- a/src/cli/command.rs +++ b/src/cli/command.rs @@ -574,12 +574,13 @@ pub fn print_bash_completion(def: &CommandLineInterface) { Err(_) => return, }; - let mut args = match shellwords::split(&cmdline) { Ok(v) => v, Err(_) => return, }; + if args.len() == 0 { return; } + args.remove(0); //no need for program name if cmdline.ends_with(char::is_whitespace) {