mirror of
https://github.com/iridakos/goto.git
synced 2025-05-18 00:10:13 -07:00
removed ability to start an alias name with a -
This commit is contained in:
parent
ae2c3b9084
commit
1174ae13fb
@ -101,8 +101,8 @@ function _goto_register_alias()
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! [[ $1 =~ ^[a-zA-Z0-9_-]*$ ]]; then
|
if ! [[ $1 =~ ^[[:alnum:]][[:alpha:]]+[a-zA-Z0-9_-]*$ ]]; then
|
||||||
_goto_error "invalid alias - only alphabetic with numbers, hyphens, and underscores"
|
_goto_error "invalid alias - only alphabetic with numbers, hyphens, and underscores. Can only start with letters and numbers."
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user