# HG changeset patch # User zegervdv # Date 1664038220 0 # Node ID e1a7072165ac7a748b4a8f738953eff4cda98150 # Parent 77f3f615e4bffc1e68e068cfc45b8219730b1fe8 Prompt loading speedups for zsh diff -r 77f3f615e4bf -r e1a7072165ac .chezmoiscripts/run_onchange_after_apply-dircolors.sh.tmpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.chezmoiscripts/run_onchange_after_apply-dircolors.sh.tmpl Sat Sep 24 16:50:20 2022 +0000 @@ -0,0 +1,7 @@ +{{ if (or (eq .chezmoi.os "linux") (eq .chezmoi.os "darwin")) -}} +#!/usr/bin/env zsh + +# .lscolors hash: {{ include "dot_lscolors" | sha256sum }} + +dircolors --sh ~/.lscolors >> ~/.dircolors.zsh +{{ end -}} diff -r 77f3f615e4bf -r e1a7072165ac dot_zshrc --- a/dot_zshrc Sat Sep 24 16:02:02 2022 +0000 +++ b/dot_zshrc Sat Sep 24 16:50:20 2022 +0000 @@ -47,19 +47,17 @@ esac } -autoload -Uz vcs_info +autoload -Uz vcs_info add-zsh-hook zstyle ':vcs_info:*' enable git hg zstyle ':vcs_info:*' actionformats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f ' zstyle ':vcs_info:*' formats '%F{4}%s%F{5}%F{3} @ %F{2}%b%f' zstyle ':vcs_info:hg*:*' use-simple true -precmd () { vcs_info } +add-zsh-hook precmd vcs_info zsh-defer -c 'RPROMPT="\${vcs_info_msg_0_} \${vim_mode}"' -zmodload -i zsh/complist - bindkey -v zmodload zsh/complist @@ -80,7 +78,7 @@ export LESS_TERMCAP_us=$(printf "\e[1;32m") export CLICOLOR=1 -eval "$(dircolors --sh ~/.lscolors)" +source ~/.dircolors.zsh # Options setopt monitor @@ -288,7 +286,12 @@ ZSH_AUTOSUGGEST_STRATEGY=histdb_top_here -autoload -U compinit && compinit +autoload -U compinit + +for dump in ~/.zcompdump(N.mh+24); do + compinit +done +compinit -C if [ ${TMUX} ]; then unset zle_bracketed_paste