Another effort to make the cd completion work without running command substitutions off of the main thread

This commit is contained in:
ridiculousfish
2012-05-06 13:51:11 -07:00
parent 71a8d39372
commit e0baab2722
2 changed files with 2 additions and 4 deletions

View File

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

View File

@@ -767,8 +767,7 @@ int parser_t::eval_args( const wchar_t *line, std::vector<completion_t> &args )
expand_flags_t eflags = 0; expand_flags_t eflags = 0;
if (! show_errors) if (! show_errors)
eflags |= EXPAND_NO_DESCRIPTIONS; eflags |= EXPAND_NO_DESCRIPTIONS;
// Completions need command substitution (for example, the cd completion uses this) if (this->parser_type != PARSER_TYPE_GENERAL)
if (this->parser_type != PARSER_TYPE_GENERAL && this->parser_type != PARSER_TYPE_COMPLETIONS_ONLY)
eflags |= EXPAND_SKIP_CMDSUBST; eflags |= EXPAND_SKIP_CMDSUBST;
/* /*