Skip to content

Commit 2f22d2c

Browse files
committed
Speedup zsh
1 parent 061a6fa commit 2f22d2c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.zshrc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ fi
2525
# Disable automatic oh-my-zsh update
2626
zstyle ':omz:update' mode disabled
2727

28+
# Disable some useless features
29+
DISABLE_MAGIC_FUNCTIONS="true"
30+
DISABLE_COMPFIX="true"
31+
2832
# Enable oh-my-zsh
2933
source $ZSH/oh-my-zsh.sh
3034

@@ -628,6 +632,16 @@ zle -N accept-line reset-prompt-and-accept-line
628632

629633
################################################################################
630634

635+
autoload -Uz compinit
636+
637+
if [[ "$(date +'%j')" != "$(stat -f '%Sm' -t '%j' ~/.zcompdump 2>/dev/null)" ]] ; then
638+
compinit
639+
else
640+
compinit -C
641+
fi
642+
643+
################################################################################
644+
631645
# Include local zshrc
632646
if [[ -f $HOME/.zshrc.local ]] ; then
633647
source $HOME/.zshrc.local

0 commit comments

Comments
 (0)