diff --git a/templates/posix.txt b/templates/posix.txt index 3da30db..5a3ba5b 100644 --- a/templates/posix.txt +++ b/templates/posix.txt @@ -105,7 +105,7 @@ __zoxide_z() { \command printf 'zoxide: $OLDPWD is not set' return 1 fi - elif [ "$#" -eq 1 ] && [ "$1" = '.' -o "$1" = '..' ]; then + elif [ "$#" -eq 1 ] && { [ "$1" = '.' ] || [ "$1" = '..' ]; }; then __zoxide_cd "$1" elif [ "$#" -eq 1 ] && [ -d "$1" ]; then __zoxide_cd "$1"