diff --git a/dot_config/zsh/dot_zshrc b/dot_config/zsh/dot_zshrc index f6a7e7f..d480fc2 100644 --- a/dot_config/zsh/dot_zshrc +++ b/dot_config/zsh/dot_zshrc @@ -4,7 +4,7 @@ # # Lines configured by zsh-newuser-install export HISTFILE="$XDG_STATE_HOME"/zsh/history -mkdir -p "$(dirname $HISTFILE)" +mkdir -p "$(dirname "$HISTFILE")" HISTSIZE=100000 SAVEHIST=100000 setopt autocd @@ -21,7 +21,7 @@ compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION" # for shell integration precmd() { - print -Pn "\e]133;A\e\\" + print -Pn "\e]133;A\e\\" } # prompt configuration @@ -51,8 +51,8 @@ alias xrm='sudo xbps-remove' # GPG setup (and SSH) if command -v keychain >/dev/null; then - alias keychain='keychain --dir "$XDG_RUNTIME_DIR" --absolute' - eval `keychain --quiet --eval --agents gpg D7F966B85D985743C76A17AC5A9572AE7B2E7E1C` + alias keychain="keychain --absolute --dir $XDG_RUNTIME_DIR" + eval "$(keychain --quiet --eval --agents gpg D7F966B85D985743C76A17AC5A9572AE7B2E7E1C)" fi if command -v gpgconf >/dev/null; then SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" @@ -61,6 +61,9 @@ fi ### End user configuration ### hooks/includes -. /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh -. /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh -. /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +for plugin in zsh-history-substring-search zsh-autosuggestions \ + zsh-syntax-highlighting; do + if [ -f /usr/share/zsh/plugins/$plugin/${plugin}.zsh ]; then + . /usr/share/zsh/plugins/$plugin/${plugin}.zsh + fi +done