mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 12:21:19 -03:00
Don't add a space if completion only added a single "/"
This added a space if only one character was added, e.g.
```fish
cd dev<TAB>
```
would complete to
```fish
cd dev/<SPACE>
```
which makes picking deeper directories awkward.
So just go back to the old behavior of doing it for any length.
This is a regression from e27d97b02e.
cc @krobelus
This commit is contained in:
@@ -196,7 +196,7 @@ static complete_flags_t resolve_auto_space(const wcstring &comp, complete_flags_
|
||||
if (flags & COMPLETE_AUTO_SPACE) {
|
||||
new_flags &= ~COMPLETE_AUTO_SPACE;
|
||||
size_t len = comp.size();
|
||||
if (len > 1 && (std::wcschr(L"/=@:.,-", comp.at(len - 1)) != nullptr))
|
||||
if (len > 0 && (std::wcschr(L"/=@:.,-", comp.at(len - 1)) != nullptr))
|
||||
new_flags |= COMPLETE_NO_SPACE;
|
||||
}
|
||||
return new_flags;
|
||||
|
||||
Reference in New Issue
Block a user