diff --git a/src/binary/completer.rs b/src/binary/completer.rs index 9ea1c67cdfe8f1f1e70ad51b87a8143ac984c72c..2e032261277064aae7e41f3b68b7c0e310764fa0 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)) }) });