diff --git a/init.sh b/init.sh index 55a9c95..892d186 100644 --- a/init.sh +++ b/init.sh @@ -24,7 +24,9 @@ if [[ -n ${BASH_VERSION} ]]; then ENHANCD_ROOT="$(builtin cd "$(command dirname "${BASH_SOURCE}")" && pwd)" elif [[ -n ${ZSH_VERSION} ]]; then # ZSH - ENHANCD_ROOT="${${(%):-%x}:A:h}" + 0="${ZERO:-${${0:#$ZSH_ARGZERO}:-${(%):-%N}}}" + 0="${${(M)0:#/*}:-$PWD/$0}" + ENHANCD_ROOT="${0:A:h}" compdef _cd __enhancd::cd fi