Change abbr to allow non-letter keys (#2996)

This commit is contained in:
Elis Axelsson 2016-05-06 16:15:47 +02:00 committed by Fabian Homborg
parent bc6cc4c105
commit 1c6f6df2b3

View file

@ -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