mirror of https://github.com/akelge/zsh
Change z command logic
This commit is contained in:
parent
34b07d5610
commit
1d175dd9cc
|
@ -15,4 +15,4 @@ PURE_CMD_MAX_EXEC_TIME=30
|
||||||
# prompt mypure
|
# prompt mypure
|
||||||
# prompt pure
|
# prompt pure
|
||||||
|
|
||||||
# vim: set ts=4 sw=4 tw=0 ft=zsh :
|
# vim: set ts=4 sw=4 tw=0 ft=zsh :
|
||||||
|
|
|
@ -10,12 +10,20 @@ 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"
|
||||||
|
|
||||||
if whence kubectl > /dev/null; then
|
if whence kubectl > /dev/null; then
|
||||||
alias k=kubectl
|
alias k=kubectl
|
||||||
alias kk='kubectl konfig merge ~/.kube/configs/* > ~/.kube/config'
|
alias kk='kubectl konfig merge ~/.kube/configs/* > ~/.kube/config'
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue