-
Notifications
You must be signed in to change notification settings - Fork 717
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
Comments
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 |
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 |
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
zsh-completions won't work properly as an oh-my-zsh plugin. See zsh-users/zsh-completions#603.
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
I used to have my configuration like this on Arch with Kitty terminal:
and I recently migrated to Mac and partial autocompletions doesn't work (Alt + right Arrow). I've been messing around with the plugin and reading the docs and issues and I just remove it from the plugin list and it works perfectly. This is my final version:
EDIT: |
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: