mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-30 06:03:49 +08:00
Don't do completions or autosuggestions for commands with wildcards.
Fixes https://github.com/fish-shell/fish-shell/issues/785
This commit is contained in:
parent
46452e7634
commit
307a4ae9e8
10
expand.cpp
10
expand.cpp
|
@ -1730,8 +1730,14 @@ int expand_string(const wcstring &input, std::vector<completion_t> &output, expa
|
|||
remove_internal_separator(next_str, (EXPAND_SKIP_WILDCARDS & flags) ? true : false);
|
||||
const wchar_t *next = next_str.c_str();
|
||||
|
||||
if (((flags & ACCEPT_INCOMPLETE) && (!(flags & EXPAND_SKIP_WILDCARDS))) ||
|
||||
wildcard_has(next, 1))
|
||||
const bool has_wildcard = wildcard_has(next, 1);
|
||||
|
||||
if (has_wildcard && (flags & EXECUTABLES_ONLY))
|
||||
{
|
||||
// Don't do wildcard expansion for executables. See #785. So do nothing here.
|
||||
}
|
||||
else if (((flags & ACCEPT_INCOMPLETE) && (!(flags & EXPAND_SKIP_WILDCARDS))) ||
|
||||
has_wildcard)
|
||||
{
|
||||
const wchar_t *start, *rest;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user