mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-28 09:31:16 -03:00
Test case for autoload + erase + autoload
Commit 5918bca1eb (Make "complete -e" prevent completion autoloading,
2024-08-24) has a weird "!removed" check; it was added because "complete
-e" only needs to create the tombstone if we removed nothing. Otherwise the
autoloader will usually take care of not loading the removed completions again.
We should probably get rid of "!removed".. for now add a test to demonstrate
this behavior.
This commit is contained in:
@@ -1,6 +1,17 @@
|
||||
#RUN: %fish %s
|
||||
#RUN: fish=%fish %fish %s
|
||||
|
||||
complete -e cat
|
||||
|
||||
complete -C"cat -" | wc -l
|
||||
$fish -c '
|
||||
complete -e cat
|
||||
complete -C"cat -" | wc -l
|
||||
'
|
||||
# CHECK: 0
|
||||
|
||||
# Note: this is *not* handled by the tombstone logic.
|
||||
# We don't reload cat.fish because it is cached by the autoloader,
|
||||
# and we don't invalidate the cache.
|
||||
$fish -c '
|
||||
complete -C"cat -" >/dev/null
|
||||
complete -e cat
|
||||
complete -C"cat -" | wc -l
|
||||
'
|
||||
# CHECK: 0
|
||||
|
||||
Reference in New Issue
Block a user