Skip to content
Snippets Groups Projects
Commit 560a189f authored by AdminXVII's avatar AdminXVII
Browse files

Bring back escaping of files with spaces in it

parent 01b551eb
No related branches found
No related tags found
1 merge request!1063Bring back escaping of files with spaces in it
...@@ -21,7 +21,7 @@ fn escape(input: &str) -> String { ...@@ -21,7 +21,7 @@ fn escape(input: &str) -> String {
for character in input.bytes() { for character in input.bytes() {
match character { match character {
b'(' | b')' | b'[' | b']' | b'&' | b'$' | b'@' | b'{' | b'}' | b'<' | b'>' | b';' 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); output.push(character);
...@@ -242,7 +242,7 @@ fn filename_completion<'a>(start: &'a str, path: &'a PathBuf) -> impl Iterator<I ...@@ -242,7 +242,7 @@ fn filename_completion<'a>(start: &'a str, path: &'a PathBuf) -> impl Iterator<I
if file.is_dir() { if file.is_dir() {
joined.push('/'); joined.push('/');
} }
Some(joined) Some(escape(&joined))
}) })
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment