-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
oh-my-zsh installation instructions are sub-optimal #603
Labels
Comments
alabeduarte
added a commit
to alabeduarte/dotfiles
that referenced
this issue
Jan 9, 2019
geodimm
pushed a commit
to geodimm/dotfiles
that referenced
this issue
Apr 16, 2020
geodimm
added a commit
to geodimm/dotfiles
that referenced
this issue
Apr 20, 2021
geodimm
added a commit
to geodimm/dotfiles
that referenced
this issue
Apr 20, 2021
Just to clarify, the suggestion is to replace: plugins=(… zsh-completions)
source "$ZSH/oh-my-zsh.sh"
autoload -U compinit && compinit With: fpath+="${ZSH_CUSTOM:-"$ZSH/custom"}/plugins/zsh-completions/src"
source "$ZSH/oh-my-zsh.sh" The above is just an optimized version of the previously suggested, which takes the ZSH_CUSTOM into account if set. References ohmyzsh/ohmyzsh#10412 |
felipecrs
added a commit
to felipecrs/dotfiles
that referenced
this issue
Nov 12, 2021
Now we don't recompiled the completions twice, at least. However, this could probably be done better if OMZ supported such a thing, at least for zsh-completions. References ohmyzsh/ohmyzsh#10412 References zsh-users/zsh-completions#603
It's important to remove |
bo5o
added a commit
to bo5o/zsh-asdf-direnv
that referenced
this issue
Oct 28, 2022
compinit is called before plugins are loaded. to avoid having to call compinit again after loading this plugin, suggest to set fpath outside of the plugin in zshrc. see also this issue zsh-users/zsh-completions#603
ZhongRuoyu
added a commit
to ZhongRuoyu/dotfiles
that referenced
this issue
Jan 31, 2023
zsh-completions won't work properly as an oh-my-zsh plugin. See zsh-users/zsh-completions#603.
redxtech
pushed a commit
to redxtech/zsh-asdf-direnv
that referenced
this issue
Jun 8, 2023
compinit is called before plugins are loaded. to avoid having to call compinit again after loading this plugin, suggest to set fpath outside of the plugin in zshrc. see also this issue zsh-users/zsh-completions#603
8 tasks
geodimm
added a commit
to geodimm/dotfiles
that referenced
this issue
Dec 4, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current instructions: README.md#oh-my-zsh, suggest to add zsh-completions to
plugins
and reruncompinit
.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 invokescompinit
. I think it's best to just suggest adding the zsh-completionssrc
dir tofpath
before thesource $ZSH/oh-my-zsh.sh
line, in order to avoid this issue. Something like this:The text was updated successfully, but these errors were encountered: