mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-21 00:31:15 -03:00
Commit 5918bca1eb (Make "complete -e" prevent completion autoloading,
2024-08-24) makes "complete -e foo" add a tombstone for "foo", meaning we
will never again load completions for "foo".
Due to an oversight, the same tombstone is added when we clear cached
completions after changing "fish_complete_path", preventing completions from
being loaded in that case. Fix this by restoring the old behavior unless
the user actually used "complete -e".
22 lines
454 B
Fish
22 lines
454 B
Fish
#RUN: %fish %s
|
|
|
|
set -g fish_complete_path c1 c2
|
|
mkdir c1 c2
|
|
|
|
function foo; end
|
|
for i in c1 c2
|
|
echo >$i/foo.fish "echo auto-loading $i/foo.fish"
|
|
end
|
|
complete -C "foo " >/dev/null
|
|
# CHECK: auto-loading c1/foo.fish
|
|
complete -C "foo " >/dev/null
|
|
# already loaded
|
|
|
|
set -g fish_complete_path c2
|
|
complete -C "foo " >/dev/null
|
|
# CHECK: auto-loading c2/foo.fish
|
|
|
|
set -g fish_complete_path c1 c2
|
|
complete -C "foo " >/dev/null
|
|
# CHECK: auto-loading c1/foo.fish
|