diff --git a/modules/completion/init.zsh b/modules/completion/init.zsh index 1d0a07e..1658946 100644 --- a/modules/completion/init.zsh +++ b/modules/completion/init.zsh @@ -16,7 +16,7 @@ fi fpath=(${0:h}/external/src ${fpath}) # load and initialize the completion system -autoload -Uz compinit && compinit -C -d ${ZDOTDIR:-${HOME}}/.zcompdump +autoload -Uz compinit && compinit -C -d "${ZDOTDIR:-${HOME}}/${zcompdump_file:-.zcompdump}" # set any compdefs source ${0:h}/compdefs.zsh diff --git a/templates/zimrc b/templates/zimrc index 482ef5e..7250fe8 100644 --- a/templates/zimrc +++ b/templates/zimrc @@ -24,6 +24,14 @@ zmodules=(directory environment git history input utility custom \ # Set your desired prompt here zprompt_theme='steeef' +# +# Completion +# + +# set an optional host-specific filename for the completion cache file +# if none is provided, the default '.zcompdump' is used. +#zcompdump_file=".zcompdump-${HOST}-${ZSH_VERSION}" + # # Utility # diff --git a/templates/zlogin b/templates/zlogin index 6243dc5..36b9e02 100644 --- a/templates/zlogin +++ b/templates/zlogin @@ -19,7 +19,9 @@ setopt EXTENDED_GLOB # zcompile the completion cache; siginificant speedup. - zcompare ${ZDOTDIR:-${HOME}}/.zcompdump + for file in ${ZDOTDIR:-${HOME}}/.zcomp^(*.zwc)(.); do + zcompare ${file} + done # zcompile .zshrc zcompare ${ZDOTDIR:-${HOME}}/.zshrc