From 9c69a81354f16d9ad160cf771289e5ac041301bf Mon Sep 17 00:00:00 2001 From: Peter Solodov Date: Wed, 14 Feb 2024 19:04:41 -0500 Subject: [PATCH] remove directory check just skip the first argument and pass the rest as is. checking for directory breaks cd'ing to symlinked directories --- templates/bash.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/bash.txt b/templates/bash.txt index 8a6bdb9..90da324 100644 --- a/templates/bash.txt +++ b/templates/bash.txt @@ -102,7 +102,7 @@ function __zoxide_zi() { \builtin unalias {{cmd}} &>/dev/null || \builtin true function {{cmd}}() { - if [[ $# -eq 2 && "$1" == "--" && -d $2 ]]; then + if [[ $# -eq 2 && "$1" == "--" ]]; then # This is how cd is called when bash's autocd option is set. To get the # directory-changing behavior first argument must be skipped. __zoxide_z "${@:2}"