mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 05:25:54 +08:00
Change abbr to allow non-letter keys (#2996)
This commit is contained in:
parent
bc6cc4c105
commit
1c6f6df2b3
@ -85,7 +85,7 @@ function abbr --description "Manage abbreviations"
|
||||
set key $kv[1]
|
||||
set value $kv[2]
|
||||
# ensure the key contains at least one non-space character
|
||||
if not string match -qr "\w" -- $key
|
||||
if not string match -qr "[^\s]" -- $key
|
||||
printf ( _ "%s: abbreviation must have a non-empty key\n" ) abbr >&2
|
||||
return 1
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user