From 560a189fcbc106cf8d65b0f6419a12d13f4cda6e Mon Sep 17 00:00:00 2001
From: Xavier L'Heureux <xavier.lheureux@icloud.com>
Date: Thu, 20 Jun 2019 14:16:17 -0400
Subject: [PATCH] Bring back escaping of files with spaces in it

---
 src/binary/completer.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/binary/completer.rs b/src/binary/completer.rs
index 9ea1c67c..2e032261 100644
--- a/src/binary/completer.rs
+++ b/src/binary/completer.rs
@@ -21,7 +21,7 @@ fn escape(input: &str) -> String {
     for character in input.bytes() {
         match character {
             b'(' | b')' | b'[' | b']' | b'&' | b'$' | b'@' | b'{' | b'}' | b'<' | b'>' | b';'
-            | b'"' | b'\'' | b'#' | b'^' | b'*' => output.push(b'\\'),
+            | b'"' | b'\'' | b'#' | b'^' | b'*' | b' ' => output.push(b'\\'),
             _ => (),
         }
         output.push(character);
@@ -242,7 +242,7 @@ fn filename_completion<'a>(start: &'a str, path: &'a PathBuf) -> impl Iterator<I
             if file.is_dir() {
                 joined.push('/');
             }
-            Some(joined)
+            Some(escape(&joined))
         })
     });
 
-- 
GitLab