mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-01 13:01:21 -03:00
abbr: Erase the old universal variable with abbr --erase
This means cleaning out old universal variables is now just: ```fish abbr --erase (abbr --list) ``` which makes upgrading much easier. Note that this erases the currently defined variable and/or any universal. It doesn't stop at the former because that makes it *easy* to remove the universals (no running `abbr --erase` twice), and it doesn't care about globals because, well, they would be gone on restart anyway. Fixes #9468.
This commit is contained in:
@@ -170,6 +170,16 @@ abbr --show
|
||||
# CHECK: abbr -a -- nonregex_name foo
|
||||
# CHECK: abbr -a --regex 'A[0-9]B' -- regex_name bar
|
||||
# CHECK: abbr -a --position anywhere --function replace_history -- !!
|
||||
|
||||
# Confirm that this erases the old uvar
|
||||
# (slightly cheating since we haven't imported it as an abbr,
|
||||
# but that's okay)
|
||||
abbr --erase cuckoo
|
||||
echo erase $status
|
||||
# CHECK: erase 0
|
||||
set --show _fish_abbr_cuckoo
|
||||
# Nothing
|
||||
|
||||
abbr --erase (abbr --list)
|
||||
|
||||
abbr --add bogus --position never stuff
|
||||
|
||||
Reference in New Issue
Block a user