mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 20:33:08 +00:00
Fix __fish_complete_directories test failure
The `sort -u` was applied only conditionally in __fish_complete_suffix, now applied universally at the final step.
This commit is contained in:
parent
4be4932786
commit
fd4b3f2c26
1 changed files with 7 additions and 6 deletions
|
@ -60,15 +60,16 @@ function __fish_complete_suffix -d "Complete using files"
|
|||
if string match -qr '[${}*~]' $comp
|
||||
set -l expanded
|
||||
eval "set expanded $comp"
|
||||
# It's very unfortunate to do all this work in-process and have to shell out here,
|
||||
# but unfortunately at this time expressions like "foo{t,te}*" applied against
|
||||
# "footer" will result in "footer" being reported twice. Not sure if this can be
|
||||
# term a "bug" per-se.
|
||||
set files (string replace -- $expanded $comp $files | sort -u)
|
||||
set files (string replace -- $expanded $comp $files)
|
||||
end
|
||||
|
||||
# It's very unfortunate to do all this work in-process and have to shell out here,
|
||||
# but unfortunately at this time expressions like "foo{t,te}*" applied against
|
||||
# "footer" will result in "footer" being reported twice. Not sure if this can be
|
||||
# term a "bug" per-se.
|
||||
|
||||
if test $files[1]
|
||||
printf "%s\t$desc\n" $files
|
||||
printf "%s\t$desc\n" $files | sort -u
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue