zsh: try to optimiza startup time
This commit is contained in:
+8
-1
@@ -17,7 +17,7 @@
|
||||
|
||||
programs.zsh = {
|
||||
autocd = true;
|
||||
enableCompletion = true;
|
||||
enableCompletion = false;
|
||||
defaultKeymap = "viins";
|
||||
dotDir = config.home.homeDirectory;
|
||||
|
||||
@@ -116,6 +116,13 @@
|
||||
RPS1="{{$BUBBLEWRAP_DIR}}"
|
||||
fi
|
||||
|
||||
autoload -Uz compinit
|
||||
if [[ -n $(print -r -- ~/.zcompdump(Nmh-24)) ]]; then
|
||||
compinit -C
|
||||
else
|
||||
compinit
|
||||
fi
|
||||
|
||||
# Recompile .zcompdump if stale
|
||||
if [[ -f ~/.zcompdump && ( ! -f ~/.zcompdump.zwc || ~/.zcompdump -nt ~/.zcompdump.zwc ) ]]; then
|
||||
zcompile ~/.zcompdump
|
||||
|
||||
Reference in New Issue
Block a user