Closed
Description
The current instructions: README.md#oh-my-zsh, suggest to add zsh-completions to plugins
and rerun compinit
.
But that's sub-optimal. This will cause Zsh to rebuild the completion cache twice on each Zsh invocation: The first when you source oh-my-zsh, and the second time when you rerun compinit
. This defeats the whole point of the completions cache, and will negatively impact the startup time of Zsh.
Sadly, oh-my-zsh doesn't seem to have a way for a plugin to add more fpath
entries, besides the root folder of the plugin, before it invokes compinit
. I think it's best to just suggest adding the zsh-completions src
dir to fpath
before the source $ZSH/oh-my-zsh.sh
line, in order to avoid this issue. Something like this:
fpath=($ZSH/custom/plugins/zsh-completions/src $fpath)