mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-11 23:47:25 +00:00
Fix for failing to properly complete cd command
This commit is contained in:
parent
47019e315a
commit
07f5319472
2 changed files with 11 additions and 3 deletions
12
complete.cpp
12
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());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -767,7 +767,7 @@ int parser_t::eval_args( const wchar_t *line, std::vector<completion_t> &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;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue