diff --git a/goto.sh b/goto.sh index 728fd67..feb5436 100644 --- a/goto.sh +++ b/goto.sh @@ -118,7 +118,7 @@ _goto_version() # Helpful for ~, ., .. paths _goto_expand_directory() { - cd "$1" 2>/dev/null && pwd + builtin cd "$1" 2>/dev/null && pwd } # Lists registered aliases. @@ -263,7 +263,7 @@ _goto_directory() 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; } }