Merge pull request #4 from jcavejr/master

Allow hyphens and underscores in aliases
This commit is contained in:
Lazarus Lazaridis 2018-03-06 22:31:29 +02:00 committed by GitHub
commit 01cdb9a8d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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