From b88b1e830ed2a2feeb8e7e7ff338d57c0c39637a Mon Sep 17 00:00:00 2001 From: Jason Tianyi Wang Date: Sun, 28 Nov 2021 23:56:28 +0900 Subject: [PATCH] Make cli handle multiple whitespaces --- datafusion-cli/src/exec.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datafusion-cli/src/exec.rs b/datafusion-cli/src/exec.rs index 41db7e6ead889..42ae774b51944 100644 --- a/datafusion-cli/src/exec.rs +++ b/datafusion-cli/src/exec.rs @@ -90,7 +90,8 @@ pub async fn exec_from_repl(ctx: &mut Context, print_options: &PrintOptions) { match rl.readline("❯ ") { Ok(line) if line.starts_with('\\') => { rl.add_history_entry(line.trim_end()); - if let Ok(cmd) = &line[1..].parse::() { + let command = line.split_whitespace().collect::>().join(" "); + if let Ok(cmd) = &command[1..].parse::() { match cmd { Command::Quit => break, _ => {