Open Avi-D-coder opened 1 year ago
So you are saying that reverting that commit fixes things?
So the newest version of zr no longer loads compinit magically for the user, since different people may or may not want that
I believe this is an issue with oh-my-zsh
Can you share a minimal oh-my-zsh example zshrc with zr that I can test with?
I recommend adding autoload -Uz compinit && compinit
to your .zshrc
I wonder if there is a good place to add that to the docs...
I would also be happy to add that minimal zshrc as a test case to run before release
@Avi-D-coder any updates?
Here's a minimal version of my config. Completions are also broken post 1.0.
# Generate new ~/.zr/init.zsh if it does not exist or ~/.zshrc is newer
if [[ ! -f ~/.config/zr.zsh ]] || [[ ~/.zshrc -nt ~/.config/zr.zsh ]]; then
zr \
robbyrussell/oh-my-zsh.git/lib/completion.zsh \
robbyrussell/oh-my-zsh.git/lib/key-bindings.zsh \
robbyrussell/oh-my-zsh.git/lib/history.zsh \
robbyrussell/oh-my-zsh.git/lib/git.zsh \
zsh-users/zsh-completions.git/src/ \
zsh-users/zsh-autosuggestions.git/zsh-autosuggestions.zsh \
junegunn/fzf.git/shell/key-bindings.zsh \
Avi-D-coder/rust-zsh-completions.git \
> ~/.cache/zr.zsh
autoload -Uz compinit; compinit -iCd $HOME/.zcompdump
source ~/.cache/zr/robbyrussell/oh-my-zsh.git/lib/directories.zsh
fi
source ~/.cache/zr.zsh
I recommend to autoload -Uz compinit;
before zr
to make sure that everything sourced correctly
autoload -Uz compinit;
I have that as well.
Here's a minimal version of my config. Completions are also broken post 1.0.
# Generate new ~/.zr/init.zsh if it does not exist or ~/.zshrc is newer if [[ ! -f ~/.config/zr.zsh ]] || [[ ~/.zshrc -nt ~/.config/zr.zsh ]]; then zr \ robbyrussell/oh-my-zsh.git/lib/completion.zsh \ robbyrussell/oh-my-zsh.git/lib/key-bindings.zsh \ robbyrussell/oh-my-zsh.git/lib/history.zsh \ robbyrussell/oh-my-zsh.git/lib/git.zsh \ zsh-users/zsh-completions.git/src/ \ zsh-users/zsh-autosuggestions.git/zsh-autosuggestions.zsh \ junegunn/fzf.git/shell/key-bindings.zsh \ Avi-D-coder/rust-zsh-completions.git \ > ~/.cache/zr.zsh autoload -Uz compinit; compinit -iCd $HOME/.zcompdump source ~/.cache/zr/robbyrussell/oh-my-zsh.git/lib/directories.zsh fi source ~/.cache/zr.zsh
I wonder how to turn this example into a test we could run in CI/CD.
This change breaks
compdef
for me. https://github.com/jedahan/zr/commit/656e5037718008d1b16b76a61ef1d173da850c33 The fix was addingautoload -Uz compinit; compinit -iCd $HOME/.zcompdump
afterzr ... > ~/.cache/zr.zsh
/home/USER/.cache/zr/robbyrussell/oh-my-zsh.git/lib/directories.zsh:32: command not found: compdef