mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Change abbr to allow non-letter keys (#2996)
(cherry picked from commit 1c6f6df2b3
)
This commit is contained in:
parent
49838c768d
commit
8ec81393a3
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ function abbr --description "Manage abbreviations"
|
||||||
set key $kv[1]
|
set key $kv[1]
|
||||||
set value $kv[2]
|
set value $kv[2]
|
||||||
# ensure the key contains at least one non-space character
|
# 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
|
printf ( _ "%s: abbreviation must have a non-empty key\n" ) abbr >&2
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue