diff --git a/cli/app.rs b/cli/app.rs index ff02d17130..3fab85b867 100644 --- a/cli/app.rs +++ b/cli/app.rs @@ -780,22 +780,20 @@ impl Limbo { pub fn handle_dot_command(&mut self, line: &str) { let first = line.split_whitespace().next(); + let args = shlex::split(line).unwrap_or_else(|| { + line.split_whitespace() + .map(str::to_owned) + .collect::>() + }); + let parse = match first { Some("parameter") | Some("param") => { - let args = shlex::split(line).unwrap_or_else(|| { - line.split_whitespace() - .map(str::to_owned) - .collect::>() - }); if args.is_empty() { return; } CommandParser::try_parse_from(args) } - _ => { - let args = line.split_whitespace(); - CommandParser::try_parse_from(args) - } + _ => CommandParser::try_parse_from(args), }; match parse { Err(err) => {