Ion double escapes spaces when tab completing after tilda.
Let's say I have a file called "~/this is an example" and I'd like to delete it. I type rm ~/thi
and then hit Tab and it completes with rm ~/this\\ is\\ an\\ example
, and if I then hit Enter it (rightly) complains that I have no file called "this\".
If, however, I am not using ~ the bug doesn't surface.
Expected behavior: tab completes are correctly escaped to be used as inputs to commands
Edit: The issue can be solved via:
diff --git a/src/binary/completer.rs b/src/binary/completer.rs
index 666bcc3..8d311b8 100644
--- a/src/binary/completer.rs
+++ b/src/binary/completer.rs
@@ -228,7 +228,7 @@ impl<'a, 'b> Completer for IonFileCompleter<'a, 'b> {
// And then we will need to take those completions and remove the expanded form
// of the tilde pattern and replace it with that pattern yet again.
completions
- .map(|completion| escape(&[tilde, &completion[e_index..]].concat()))
+ .map(|completion| [tilde, &completion[e_index..]].concat())
.collect()
} else {
Vec::new()
mrd:~/code/ion/target/debug#
However there is another bug related to escaping with there is an asterisk in play... I'm chasing that one down now.
Edited by M@