mirror of
https://github.com/iridakos/goto.git
synced 2025-05-17 16:00:17 -07:00
added ability to use hyphen and underscore in names
This commit is contained in:
parent
21f4f2b060
commit
35f83adce4
@ -101,7 +101,7 @@ function _goto_register_alias()
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! [[ $1 =~ ^[[:alnum:]]*[[:alpha:]][[:alnum:]]*$ ]]; then
|
if ! [[ $1 =~ ^[a-zA-Z0-9_-]*$ ]]; then
|
||||||
_goto_error "invalid alias - only alphabetic with numbers"
|
_goto_error "invalid alias - only alphabetic with numbers"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user