From ee9af5eecaa43dc00a0021db0c775a224e5db654 Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Sun, 17 May 2020 12:39:39 +0100 Subject: [PATCH] zsh: move compinit to end of zshrc This saves one compinit load, from 3 to 2 which should slightly reduce startup time --- .config/zsh/.zshrc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 8f96e2d..a5ab81b 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -44,15 +44,6 @@ fi setopt sharehistory histignorealldups histignorespace histreduceblanks setopt pathdirs autocd autopushd extendedglob nullglob alwaystoend interactivecomments dvorak -# Completion initialisation -autoload -U compinit ; compinit -autoload -U bashcompinit ; bashcompinit - -# gopass completion -if exists gopass; then - source <(gopass completion bash) -fi - zstyle ':completion:*:sudo|_::' environ PATH="/sbin:/usr/sbin:$PATH" HOME="/root" zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=** r:|=**' 'l:|=* r:|=*' zstyle ':completion:*' rehash true @@ -175,3 +166,13 @@ source "$ZSH_DIR/plugins/git-rprompt.zsh" [ -f '/usr/share/fzf/key-bindings.zsh' ] && source /usr/share/fzf/key-bindings.zsh [ -f '/usr/share/doc/pkgfile/command-not-found.zsh' ] && source /usr/share/doc/pkgfile/command-not-found.zsh [ -r '/usr/share/z/z.sh' ] && source /usr/share/z/z.sh + +# Completion initialisation +autoload -U compinit bashcompinit +compinit +bashcompinit + +# gopass completion +if exists gopass; then + source <(gopass completion bash) +fi