mirror of https://github.com/akelge/zsh
Change z command logic
This commit is contained in:
parent
34b07d5610
commit
1d175dd9cc
|
@ -10,7 +10,15 @@ whence thefuck > /dev/null && eval $(thefuck --alias)
|
|||
|
||||
# z
|
||||
# [ -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
|
||||
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
|
||||
|
|
Loading…
Reference in New Issue