mirror of
https://github.com/iridakos/goto.git
synced 2025-05-16 23:40:16 -07:00
Merge pull request #4 from jcavejr/master
Allow hyphens and underscores in aliases
This commit is contained in:
commit
01cdb9a8d0
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user