Improve compinit and plugins

This commit is contained in:
Andrea Mistrali 2024-10-30 09:39:21 +01:00
parent 05eb0c7819
commit 9dd1f6819f
3 changed files with 17 additions and 16 deletions

View File

@ -2,11 +2,12 @@
# Start autocomplete
autoload -Uz compinit
if [[ -n "$HOME/.zcompdump(#qN.mh+24)" ]]; then
for dump in ~/.zcompdump(N.mh+24); do
compinit
else
touch ~/.zcompdump
done
compinit -C
fi
autoload bashcompinit && bashcompinit

View File

@ -1,17 +1,17 @@
# pyenv
if whence pyenv > /dev/null; then
if type pyenv > /dev/null; then
export PYENV_ROOT="$HOME/.pyenv"
# eval "$(pyenv init --path)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
fi
# thefuck
whence thefuck > /dev/null && eval $(thefuck --alias)
# # thefuck
# type 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
if whence zoxide > /dev/null; then ## zoxide is installed
if type 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
@ -24,10 +24,10 @@ fi
# kubectl/krew
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
if whence kubectl > /dev/null; then
if type kubectl > /dev/null; then
alias k=kubectl
alias kk='kubectl konfig merge ~/.kube/configs/* > ~/.kube/config'
fi
# Setup iTerm shell integration
test -e $HOME/.iterm2_shell_integration.zsh && source $HOME/.iterm2_shell_integration.zsh && export ITERM_ENABLE_SHELL_INTEGRATION_WITH_TMUX=YES || echo "iTerm sh integration not installed"
#test -e $HOME/.iterm2_shell_integration.zsh && source $HOME/.iterm2_shell_integration.zsh && export ITERM_ENABLE_SHELL_INTEGRATION_WITH_TMUX=YES || echo "iTerm sh integration not installed"