mirror of https://github.com/akelge/zsh
Improve compinit and plugins
This commit is contained in:
parent
05eb0c7819
commit
9dd1f6819f
|
@ -2,11 +2,12 @@
|
||||||
# Start autocomplete
|
# Start autocomplete
|
||||||
autoload -Uz compinit
|
autoload -Uz compinit
|
||||||
|
|
||||||
if [[ -n "$HOME/.zcompdump(#qN.mh+24)" ]]; then
|
for dump in ~/.zcompdump(N.mh+24); do
|
||||||
compinit
|
compinit
|
||||||
else
|
touch ~/.zcompdump
|
||||||
compinit -C
|
done
|
||||||
fi
|
|
||||||
|
compinit -C
|
||||||
|
|
||||||
autoload bashcompinit && bashcompinit
|
autoload bashcompinit && bashcompinit
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
# pyenv
|
# pyenv
|
||||||
if whence pyenv > /dev/null; then
|
if type pyenv > /dev/null; then
|
||||||
export PYENV_ROOT="$HOME/.pyenv"
|
export PYENV_ROOT="$HOME/.pyenv"
|
||||||
# eval "$(pyenv init --path)"
|
# eval "$(pyenv init --path)"
|
||||||
eval "$(pyenv init -)"
|
eval "$(pyenv init -)"
|
||||||
eval "$(pyenv virtualenv-init -)"
|
eval "$(pyenv virtualenv-init -)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# thefuck
|
# # thefuck
|
||||||
whence thefuck > /dev/null && eval $(thefuck --alias)
|
# type 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
|
||||||
if whence zoxide > /dev/null; then ## zoxide is installed
|
if type zoxide > /dev/null; then ## zoxide is installed
|
||||||
eval "$(zoxide init zsh)"
|
eval "$(zoxide init zsh)"
|
||||||
export Z_COMMAND=zoxide
|
export Z_COMMAND=zoxide
|
||||||
elif [ -f $LIBRARY/plugins/zsh-z/zsh-z.plugin.zsh ]; then ## zsh-z is installed
|
elif [ -f $LIBRARY/plugins/zsh-z/zsh-z.plugin.zsh ]; then ## zsh-z is installed
|
||||||
|
@ -24,10 +24,10 @@ 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 type 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
|
||||||
|
|
||||||
# Setup iTerm shell integration
|
# 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"
|
||||||
|
|
12
zshrc
12
zshrc
|
@ -20,12 +20,12 @@
|
||||||
[ -d ~/.zsh ] && BASE=~/.zsh
|
[ -d ~/.zsh ] && BASE=~/.zsh
|
||||||
|
|
||||||
function loadRC {
|
function loadRC {
|
||||||
[ -d $1/zshfunctions ] && fpath=($1/zshfunctions $fpath)
|
[ -d $1/zshfunctions ] && fpath=($1/zshfunctions $fpath)
|
||||||
[ -d $1/completions ] && fpath=($1/completions $fpath)
|
[ -d $1/completions ] && fpath=($1/completions $fpath)
|
||||||
|
|
||||||
for zshFile in $1/[0-9]*.zsh; do
|
for zshFile in $1/[0-9]*.zsh; do
|
||||||
source $zshFile
|
source $zshFile
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# Default PATH
|
# Default PATH
|
||||||
|
@ -43,6 +43,6 @@ PATH="$PATH:$HOME/bin"
|
||||||
|
|
||||||
# Add local customization file
|
# Add local customization file
|
||||||
if [ -w $LIBRARY ]; then
|
if [ -w $LIBRARY ]; then
|
||||||
[ -f $LIBRARY/99-local.zsh ] || echo "# Local customizations" > $LIBRARY/99-local.zsh
|
[ -f $LIBRARY/99-local.zsh ] || echo "# Local customizations" > $LIBRARY/99-local.zsh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue