aboutsummaryrefslogtreecommitdiffhomepage
path: root/complete.cpp
diff options
context:
space:
mode:
authorGravatar Mandeep Sandhu <mandeepsandhu.chd@gmail.com>2013-12-20 16:58:20 +0530
committerGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2013-12-30 12:20:44 +0800
commit8078d29fdaa9d138d0b28b0e84e1d7c0279afbd3 (patch)
tree9a4e8992a0f01ff5ba6f71aafeeb46138cb2c66c /complete.cpp
parent541db5fbbea9cbe4412472621965515b2297e9c2 (diff)
Fix completion bug for special fish characters.
Issue #1108: If there are special characters like '{' in the completion suggestions, then we fail to parse it successfully as we are passing an unescaped version of the character to parser_t::eval_args(...). This causes us to retun w/o completion suggestions. This bug was discovered while implementing 'git stash' completion as the suggestion contained strings like 'stash@\{0\}'. Th fix is to properly escape the string before parsing it.
Diffstat (limited to 'complete.cpp')
-rw-r--r--complete.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/complete.cpp b/complete.cpp
index ed0fc102..7c344557 100644
--- a/complete.cpp
+++ b/complete.cpp
@@ -1240,7 +1240,7 @@ void completer_t::complete_from_args(const wcstring &str,
if (! is_autosuggest)
proc_pop_interactive();
- this->complete_strings(str, desc.c_str(), 0, possible_comp, flags);
+ this->complete_strings(escape_string(str, ESCAPE_ALL), desc.c_str(), 0, possible_comp, flags);
}
/**