Skip to content

Commit 8ba3c5c

Browse files
committed
Clean up .zshrc and use new trick for speeding up compinit
1 parent 9a0f5b9 commit 8ba3c5c

1 file changed

Lines changed: 4 additions & 31 deletions

File tree

‎zshrc‎

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,12 @@ if type brew &>/dev/null; then
4545
FPATH=/usr/local/share/zsh/site-functions:$FPATH
4646
fi
4747

48-
# Speed up completion init, see: https://htr3n.github.io/2018/07/faster-zsh/
48+
# Speed up completion init, see: https://gist.github.com/ctechols/ca1035271ad134841284
4949
autoload -Uz compinit
50-
51-
if [[ $OSTYPE = darwin* ]]; then
52-
if [ $(date +'%j') != $(/usr/bin/stat -f '%Sm' -t '%j' ${ZDOTDIR:-$HOME}/.zcompdump) ]; then
53-
compinit
54-
else
55-
compinit -C
56-
fi
57-
else
50+
for dump in ~/.zcompdump(N.mh+24); do
5851
compinit
59-
fi
52+
done
53+
compinit -C
6054

6155
# unsetopt menucomplete
6256
unsetopt flowcontrol
@@ -439,11 +433,6 @@ if [ -e ~/bin/rtx ]; then
439433
eval "$(~/bin/rtx activate zsh)"
440434
fi
441435

442-
# google cloud sdk
443-
if [ -e /opt/homebrew/share/google-cloud-sdk/path.zsh.inc ]; then
444-
source /opt/homebrew/share/google-cloud-sdk/path.zsh.inc
445-
fi
446-
447436
# node.js
448437
export NODE_PATH="/usr/local/lib/node_modules:$NODE_PATH"
449438

@@ -462,9 +451,6 @@ fi
462451
if [ -e /opt/homebrew/opt/fzf/shell/completion.zsh ]; then
463452
source /opt/homebrew/opt/fzf/shell/key-bindings.zsh
464453
source /opt/homebrew/opt/fzf/shell/completion.zsh
465-
elif [ -e /usr/local/opt/fzf/shell/completion.zsh ]; then
466-
source /usr/local/opt/fzf/shell/key-bindings.zsh
467-
source /usr/local/opt/fzf/shell/completion.zsh
468454
else
469455
# fzf via local installation
470456
if [ -e ~/.fzf ]; then
@@ -494,18 +480,5 @@ fi
494480

495481
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
496482

497-
if type bat &> /dev/null; then
498-
set_bat_theme
499-
# alias cat=bat
500-
fi
501-
502-
# sg & Sourcegraph
503-
export PATH="$HOME/.sg:$PATH"
504-
505-
if [ -e "$HOME/.sourcegraph/sg.zsh_autocomplete" ]; then
506-
PROG=sg source "$HOME/.sourcegraph/sg.zsh_autocomplete"
507-
fi
508-
export MG_DEPLOY_SOURCEGRAPH_MANAGED_PATH=/Users/thorstenball/work/deploy-sourcegraph-managed
509-
510483
# Export my personal ~/bin as last one to have highest precedence
511484
export PATH="$HOME/bin:$PATH"

0 commit comments

Comments
 (0)