Merge pull request #52 from escozul/hotfix/improve-various-bash-compatibility

Improve compatibility with various bash configs
This commit is contained in:
Lazarus Lazaridis 2019-04-12 17:44:44 +03:00 committed by GitHub
commit b31295da8b
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; }
} }