Files
fish-shell/tests/checks/autoload.fish
Johannes Altmanninger a7c04890c9 Fix "set fish_complete_path" accidentally disabling autoloading
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".
2025-05-29 17:57:38 +02:00

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