From 6324b4e347a45ba7e07ec2584d11e133fad3bd84 Mon Sep 17 00:00:00 2001 From: Tony <80319889+Tony-Busy@users.noreply.github.com> Date: Tue, 17 Jun 2025 17:57:46 +0800 Subject: [PATCH] Add support for multi digits dirstack entry (e.g. +12). (#1080) --- templates/zsh.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/zsh.txt b/templates/zsh.txt index 631251a..80cd428 100644 --- a/templates/zsh.txt +++ b/templates/zsh.txt @@ -84,7 +84,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 "$1" ]] || [[ "$1" = '-' ]] || [[ "$1" =~ ^[-+][0-9]+$ ]]; }; then __zoxide_cd "$1" elif [[ "$#" -eq 2 ]] && [[ "$1" = "--" ]]; then __zoxide_cd "$2"