Change z command logic

This commit is contained in:
Andrea Mistrali 2023-10-10 12:24:53 +02:00
parent 34b07d5610
commit 1d175dd9cc
Signed by: andre
SSH Key Fingerprint: SHA256:/D780pZnuHMQ8xFII5lAtXWy8zdowtBhgWjwi88p+lI
2 changed files with 11 additions and 3 deletions

View File

@ -10,7 +10,15 @@ whence thefuck > /dev/null && eval $(thefuck --alias)
# z # z
# [ -f $LIBRARY/plugins/zsh-z/zsh-z.plugin.zsh ] && source $LIBRARY/plugins/zsh-z/zsh-z.plugin.zsh # [ -f $LIBRARY/plugins/zsh-z/zsh-z.plugin.zsh ] && source $LIBRARY/plugins/zsh-z/zsh-z.plugin.zsh
whence zoxide > /dev/null && eval eval "$(zoxide init zsh)" if [ $(whence zoxide > /dev/null) ]; then ## zoxide is installed
eval $(zoxide init zsh)
export Z_COMMAND=zoxide
elif [ -f $LIBRARY/plugins/zsh-z/zsh-z.plugin.zsh ]; then ## zsh-z is installed
source $LIBRARY/plugins/zsh-z/zsh-z.plugin.zsh
export Z_COMMAND=zsh-z
else
echo "No zoxide or zsh-z found, z command disabled"
fi
# kubectl/krew # kubectl/krew
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"