mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
fix bug in ~ completion
Fix bug introduced by commit c114cbc9a
that causes only the first match
for a ~ completion to be available for selection.
Fixes #4075
This commit is contained in:
parent
603c865129
commit
eff2a3c3a3
1 changed files with 0 additions and 2 deletions
|
@ -1207,14 +1207,12 @@ bool completer_t::try_complete_user(const wcstring &str) {
|
|||
wcstring desc = format_string(COMPLETE_USER_DESC, pw_name);
|
||||
append_completion(&this->completions, &pw_name[name_len], desc, COMPLETE_NO_SPACE);
|
||||
result = true;
|
||||
break;
|
||||
} else if (wcsncasecmp(user_name, pw_name, name_len) == 0) {
|
||||
wcstring name = format_string(L"~%ls", pw_name);
|
||||
wcstring desc = format_string(COMPLETE_USER_DESC, pw_name);
|
||||
append_completion(&this->completions, name, desc,
|
||||
COMPLETE_REPLACES_TOKEN | COMPLETE_DONT_ESCAPE | COMPLETE_NO_SPACE);
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
|
||||
// If we've spent too much time (more than 200 ms) doing this give up.
|
||||
|
|
Loading…
Reference in a new issue