diff --git a/complete.cpp b/complete.cpp index e9dca8e35..57720e6d0 100644 --- a/complete.cpp +++ b/complete.cpp @@ -277,6 +277,8 @@ class completer_t { void complete_param_expand(const wcstring &str, bool do_file); + void debug_print_completions(); + void complete_cmd( const wcstring &str, bool use_function, bool use_builtin, @@ -1522,8 +1524,14 @@ void completer_t::complete_param_expand( const wcstring &sstr, bool do_file) flags | this->expand_flags() ) == EXPAND_ERROR ) { debug( 3, L"Error while expanding string '%ls'", comp_str ); - } - + } +} + +void completer_t::debug_print_completions() +{ + for (size_t i=0; i < completions.size(); i++) { + printf("- Completion: %ls\n", completions.at(i).completion.c_str()); + } } /** diff --git a/parser.cpp b/parser.cpp index 513bf316c..33f510285 100644 --- a/parser.cpp +++ b/parser.cpp @@ -767,7 +767,7 @@ int parser_t::eval_args( const wchar_t *line, std::vector &args ) expand_flags_t eflags = 0; if (! show_errors) eflags |= EXPAND_NO_DESCRIPTIONS; - 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; /*