You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/12/02 06:21:41 UTC

[GitHub] [arrow-datafusion] houqp commented on a change in pull request #1388: Make cli handle multiple whitespaces

houqp commented on a change in pull request #1388:
URL: https://github.com/apache/arrow-datafusion/pull/1388#discussion_r760791689



##########
File path: 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::<Command>() {
+                let command = line.split_whitespace().collect::<Vec<_>>().join(" ");

Review comment:
       have you tried the trim method? https://doc.rust-lang.org/stable/std/string/struct.String.html#method.trim




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org