Update goto.sh

This commit is contained in:
escozul 2019-04-01 17:50:25 +03:00 committed by GitHub
parent 736a27b4ad
commit 119c93c983
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,7 +118,7 @@ _goto_version()
# Helpful for ~, ., .. paths # Helpful for ~, ., .. paths
_goto_expand_directory() _goto_expand_directory()
{ {
cd "$1" 2>/dev/null && pwd builtin cd "$1" 2>/dev/null && pwd
} }
# Lists registered aliases. # Lists registered aliases.
@ -263,7 +263,7 @@ _goto_directory()
target=$(_goto_resolve_alias "$1") || return 1 target=$(_goto_resolve_alias "$1") || return 1
cd "$target" 2> /dev/null || \ builtin cd "$target" 2> /dev/null || \
{ _goto_error "Failed to goto '$target'" && return 1; } { _goto_error "Failed to goto '$target'" && return 1; }
} }