Fix to restore completions that use command substitution (like cd)

Fix to adopt the same escaping code for both completions and autosuggestions
This commit is contained in:
ridiculousfish
2012-05-06 13:36:51 -07:00
parent 90826e4031
commit 71a8d39372
5 changed files with 18 additions and 165 deletions

View File

@@ -1163,7 +1163,8 @@ void completer_t::complete_from_args( const wcstring &str,
std::vector<completion_t> possible_comp;
bool is_autosuggest = (this->type == COMPLETE_AUTOSUGGEST);
parser_t parser(is_autosuggest ? PARSER_TYPE_COMPLETIONS_ONLY : PARSER_TYPE_GENERAL);
bool show_errors = ! is_autosuggest;
parser_t parser(PARSER_TYPE_COMPLETIONS_ONLY, show_errors);
/* If type is COMPLETE_AUTOSUGGEST, it means we're on a background thread, so don't call proc_push_interactive */
if (! is_autosuggest)