[completion] add ${zcompdump_file} option
This commit assumes that the user-provided variable for the filename will start with '.zcomp'. This is used in the .zlogin for zcompiling the completion file. Sourcing the .zimrc file within the .zlogin file is something I'd rather not do, and this seems like a good compromise. If this becomes an issue, the file can be sourced an the var can be used instead. Closes #42
This commit is contained in:
parent
f1e697db6f
commit
d36d57e62a
@ -16,7 +16,7 @@ fi
|
|||||||
fpath=(${0:h}/external/src ${fpath})
|
fpath=(${0:h}/external/src ${fpath})
|
||||||
|
|
||||||
# load and initialize the completion system
|
# 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
|
# set any compdefs
|
||||||
source ${0:h}/compdefs.zsh
|
source ${0:h}/compdefs.zsh
|
||||||
|
@ -24,6 +24,14 @@ zmodules=(directory environment git history input utility custom \
|
|||||||
# Set your desired prompt here
|
# Set your desired prompt here
|
||||||
zprompt_theme='steeef'
|
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
|
# Utility
|
||||||
#
|
#
|
||||||
|
@ -19,7 +19,9 @@
|
|||||||
setopt EXTENDED_GLOB
|
setopt EXTENDED_GLOB
|
||||||
|
|
||||||
# zcompile the completion cache; siginificant speedup.
|
# zcompile the completion cache; siginificant speedup.
|
||||||
zcompare ${ZDOTDIR:-${HOME}}/.zcompdump
|
for file in ${ZDOTDIR:-${HOME}}/.zcomp^(*.zwc)(.); do
|
||||||
|
zcompare ${file}
|
||||||
|
done
|
||||||
|
|
||||||
# zcompile .zshrc
|
# zcompile .zshrc
|
||||||
zcompare ${ZDOTDIR:-${HOME}}/.zshrc
|
zcompare ${ZDOTDIR:-${HOME}}/.zshrc
|
||||||
|
Reference in New Issue
Block a user