mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Stop checking EXPAND_SPECIAL_FOR_CD if ..._AUTOSUGGEST is set
If EXPAND_SPECIAL_FOR_CD_AUTOSUGGEST is set, EXPAND_SPECIAL_FOR_CD is necessarily also set; simplify things by only checking for the latter.
This commit is contained in:
parent
bf63e061c9
commit
46db0dd5eb
1 changed files with 3 additions and 2 deletions
|
@ -584,11 +584,12 @@ class wildcard_expander_t {
|
|||
c->prepend_token_prefix(prefix);
|
||||
}
|
||||
|
||||
// Hack. Implement EXPAND_SPECIAL_FOR_CD by descending the deepest unique hierarchy we
|
||||
// Implement EXPAND_SPECIAL_FOR_CD_AUTOSUGGEST by descending the deepest unique
|
||||
// hierarchy we
|
||||
// can, and then appending any components to each new result.
|
||||
// Only descend deepest unique for cd autosuggest and not for cd tab completion
|
||||
// (issue #4402).
|
||||
if (flags & EXPAND_SPECIAL_FOR_CD && flags & EXPAND_SPECIAL_FOR_CD_AUTOSUGGEST) {
|
||||
if (flags & EXPAND_SPECIAL_FOR_CD_AUTOSUGGEST) {
|
||||
wcstring unique_hierarchy = this->descend_unique_hierarchy(abs_path);
|
||||
if (!unique_hierarchy.empty()) {
|
||||
for (size_t i = before; i < after; i++) {
|
||||
|
|
Loading…
Reference in a new issue