remove directory check

just skip the first argument and pass the rest as is. checking for directory
breaks cd'ing to symlinked directories
This commit is contained in:
Peter Solodov 2024-02-14 19:04:41 -05:00
parent b50ee1d9ea
commit 9c69a81354
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ function __zoxide_zi() {
\builtin unalias {{cmd}} &>/dev/null || \builtin true \builtin unalias {{cmd}} &>/dev/null || \builtin true
function {{cmd}}() { 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 # This is how cd is called when bash's autocd option is set. To get the
# directory-changing behavior first argument must be skipped. # directory-changing behavior first argument must be skipped.
__zoxide_z "${@:2}" __zoxide_z "${@:2}"