From 9e6eeb70d523ec6e3f0872d30765b36a6a5228fc Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Tue, 10 Sep 2024 17:58:14 -0700 Subject: [PATCH] zshrc: MASSIVE speedup - use omzsh's handle_completion_insecurities --- .zshrc | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/.zshrc b/.zshrc index ada18a8..346561c 100644 --- a/.zshrc +++ b/.zshrc @@ -56,6 +56,8 @@ ${SKIP_PLUGINS:-false} || { zinit snippet OMZL::termsupport.zsh # Required lib functions (specifically omz_urlencode) zinit snippet OMZL::functions.zsh + # Compaudit + zinit snippet OMZL::compfix.zsh # Quality of life @@ -203,6 +205,9 @@ bindkey '^[[A' history-substring-search-up bindkey '^[[B' history-substring-search-down bindkey -M vicmd 'k' history-substring-search-up bindkey -M vicmd 'j' history-substring-search-down + +# Run compaudit and such, from OMZL::compfix.zsh +handle_completion_insecurities &| # <<< # Colors and compinit >>> @@ -216,24 +221,7 @@ export LESS_TERMCAP_us=$'\E[01;36m' export LESS=-R autoload -Uz compinit colors zcalc # only do full compinit once per day, use cached version usually -# if ! compaudit &>/dev/null; then -# echo "WARNING!" -# echo " the following directories contain completions that have the wrong file permissions to be considered safe." -# compaudit -# echo " completions not loaded" -# echo -# echo "Please fix this and then continue" -# echo " (note, this command might help: compaudit | xargs chmod g-w,o-w)" -# echo -# else - if ! [[ -o extendedglob ]]; then setopt extendedglob; undo_setopt=true; fi - if [[ -n ${ZDOTDIR}/.zcompdump(#qN.mh+24) ]]; then - compinit - else - compinit -C - fi - if [[ undo_setopt = true ]]; then unsetopt extendedglob; fi -# fi + colors # <<< # auto save and load working dir (allow `cd -` on start) >>>