Skip to content

Commit 6324b4e

Browse files
authored
Add support for multi digits dirstack entry (e.g. +12). (#1080)
1 parent db14bdc commit 6324b4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/zsh.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function __zoxide_z() {
8484
__zoxide_doctor
8585
if [[ "$#" -eq 0 ]]; then
8686
__zoxide_cd ~
87-
elif [[ "$#" -eq 1 ]] && { [[ -d "$1" ]] || [[ "$1" = '-' ]] || [[ "$1" =~ ^[-+][0-9]$ ]]; }; then
87+
elif [[ "$#" -eq 1 ]] && { [[ -d "$1" ]] || [[ "$1" = '-' ]] || [[ "$1" =~ ^[-+][0-9]+$ ]]; }; then
8888
__zoxide_cd "$1"
8989
elif [[ "$#" -eq 2 ]] && [[ "$1" = "--" ]]; then
9090
__zoxide_cd "$2"

0 commit comments

Comments
 (0)