mirror of
https://github.com/iridakos/goto.git
synced 2025-05-15 15:00:21 -07:00
Update goto.sh
This commit is contained in:
parent
a9ad435067
commit
5bb49393c5
2
goto.sh
2
goto.sh
@ -272,7 +272,7 @@ _goto_cleanup()
|
|||||||
# Changes to the given alias' directory
|
# Changes to the given alias' directory
|
||||||
_goto_directory()
|
_goto_directory()
|
||||||
{
|
{
|
||||||
# directly goto the special name that unable register, eg: ~
|
# directly goto the special name that is unable to be registered due to invalid alias, eg: ~
|
||||||
if ! [[ $1 =~ ^[[:alnum:]]+[a-zA-Z0-9_-]*$ ]]; then
|
if ! [[ $1 =~ ^[[:alnum:]]+[a-zA-Z0-9_-]*$ ]]; then
|
||||||
{ builtin cd "$1" 2> /dev/null && return 0; } || \
|
{ builtin cd "$1" 2> /dev/null && return 0; } || \
|
||||||
{ _goto_error "Failed to goto '$1'" && return 1; }
|
{ _goto_error "Failed to goto '$1'" && return 1; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user