removed ability to start an alias name with a -

This commit is contained in:
Jeff Cave 2018-03-06 14:50:55 -05:00
parent ae2c3b9084
commit 1174ae13fb

View File

@ -101,8 +101,8 @@ function _goto_register_alias()
return
fi
if ! [[ $1 =~ ^[a-zA-Z0-9_-]*$ ]]; then
_goto_error "invalid alias - only alphabetic with numbers, hyphens, and underscores"
if ! [[ $1 =~ ^[[:alnum:]][[:alpha:]]+[a-zA-Z0-9_-]*$ ]]; then
_goto_error "invalid alias - only alphabetic with numbers, hyphens, and underscores. Can only start with letters and numbers."
return
fi