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,24 +87,28 @@ fi
# Initialize zplug's plugins # Initialize zplug's plugins
source "$XDG_DATA_HOME/zplug/init.zsh" # config in ~/.config/zsh/.zshenv if [ -r "$XDG_DATA_HOME/zplug/init.zsh" ]; then
# Must use double quotes in this section source "$XDG_DATA_HOME/zplug/init.zsh" # config in ~/.config/zsh/.zshenv
# Source: https://github.com/zplug/zplug#example
# Make zplug manage itself like a plugin # Must use double quotes in this section
# Source: https://github.com/zplug/zplug#let-zplug-manage-zplug # Source: https://github.com/zplug/zplug#example
zplug "zplug/zplug", hook-build:"zplug --self-manage"
zplug "MichaelAquilina/zsh-you-should-use" # config in ~/.zshenv # Make zplug manage itself like a plugin
# Source: https://github.com/zplug/zplug#let-zplug-manage-zplug
zplug "zplug/zplug", hook-build:"zplug --self-manage"
zplug "zsh-users/zsh-autosuggestions" # config in ~/.zshenv zplug "MichaelAquilina/zsh-you-should-use" # config in ~/.zshenv
zplug "zsh-users/zsh-history-substring-search" # config in ~/.zshenv; there are key bindings below
zplug "zsh-users/zsh-syntax-highlighting"
zplug "romkatv/powerlevel10k", as:theme, depth:1 zplug "zsh-users/zsh-autosuggestions" # config in ~/.zshenv
zplug "zsh-users/zsh-history-substring-search" # config in ~/.zshenv; there are key bindings below
zplug "zsh-users/zsh-syntax-highlighting"
zplug load zplug "romkatv/powerlevel10k", as:theme, depth:1
zplug load
fi
@ -169,14 +173,16 @@ bindkey -M menuselect 'k' vi-up-line-or-history
bindkey -M menuselect 'l' vi-forward-char bindkey -M menuselect 'l' vi-forward-char
bindkey -M menuselect 'j' vi-down-line-or-history bindkey -M menuselect 'j' vi-down-line-or-history
# history-substring-search plugin if [ -r "$XDG_DATA_HOME/zplug/init.zsh" ]; then
# Source: https://github.com/zsh-users/zsh-history-substring-search#usage # history-substring-search plugin
# Normal mode # Source: https://github.com/zsh-users/zsh-history-substring-search#usage
bindkey "$terminfo[kcuu1]" history-substring-search-up # Normal mode
bindkey "$terminfo[kcud1]" history-substring-search-down bindkey "$terminfo[kcuu1]" history-substring-search-up
# VI mode bindkey "$terminfo[kcud1]" history-substring-search-down
bindkey -M vicmd 'k' history-substring-search-up # VI mode
bindkey -M vicmd 'j' history-substring-search-down bindkey -M vicmd 'k' history-substring-search-up
bindkey -M vicmd 'j' history-substring-search-down
fi