Check if zplug is available first

This commit is contained in:
Alexander Hess 2024-07-03 08:26:25 +02:00
parent 16cde0d3d6
commit d9372bd5b5
Signed by: alexander
GPG key ID: 344EA5AB10D868E0

View file

@ -87,6 +87,8 @@ fi
# Initialize zplug's plugins
if [ -r "$XDG_DATA_HOME/zplug/init.zsh" ]; then
source "$XDG_DATA_HOME/zplug/init.zsh" # config in ~/.config/zsh/.zshenv
# Must use double quotes in this section
@ -106,6 +108,8 @@ zplug "romkatv/powerlevel10k", as:theme, depth:1
zplug load
fi
# Initialize various utilities and aliases
@ -169,6 +173,7 @@ bindkey -M menuselect 'k' vi-up-line-or-history
bindkey -M menuselect 'l' vi-forward-char
bindkey -M menuselect 'j' vi-down-line-or-history
if [ -r "$XDG_DATA_HOME/zplug/init.zsh" ]; then
# history-substring-search plugin
# Source: https://github.com/zsh-users/zsh-history-substring-search#usage
# Normal mode
@ -177,6 +182,7 @@ bindkey "$terminfo[kcud1]" history-substring-search-down
# VI mode
bindkey -M vicmd 'k' history-substring-search-up
bindkey -M vicmd 'j' history-substring-search-down
fi