diff --git a/templates/zsh.txt b/templates/zsh.txt index f900f3a..d437052 100644 --- a/templates/zsh.txt +++ b/templates/zsh.txt @@ -89,7 +89,7 @@ function __zoxide_z() { __zoxide_doctor if [[ "$#" -eq 0 ]]; then __zoxide_cd ~ - elif [[ "$#" -eq 1 ]] && { [[ -d "$1" ]] || [[ "$1" = '-' ]] || [[ "$1" =~ ^[-+][0-9]+$ ]]; }; then + elif [[ "$#" -eq 1 ]] && { [[ -d "$(realpath -L "$PWD"/"$1")" ]] || [[ "$1" = '-' ]] || [[ "$1" =~ ^[-+][0-9]+$ ]]; }; then __zoxide_cd "$1" elif [[ "$#" -eq 2 ]] && [[ "$1" = "--" ]]; then __zoxide_cd "$2"