zap-zsh / zap

:zap: Zap is a minimal zsh plugin manager
https://www.zapzsh.com/
GNU General Public License v3.0
942 stars 33 forks source link

unable to zap update , the plugin is in diverged state due to grep config error #168

Closed aikenji closed 1 year ago

aikenji commented 1 year ago

Screenshot 2023-06-13 at 4 39 52 PM the zap is unable to update. The log shows all plugins are in diverged states. and some error logs shows it is due to the grep config error. it make me confused. I migrate zap from ohmyzsh one weeks ago, it is perfectly fast simple and update correctly after the first installation. but when I change the .zshrc, the error log appears.

Here is necessary information about my environment: OS : macOS 13.2.1 arm64 and Debian 11 armhf kernel : 22.3.0 shell: zsh 5.8.1

my .zshrc is: https://github.com/aikenji/dotfiles/blob/main/zsh/.zshrc I put all zap setups on the bottom of my .zshrc file

wintermi commented 1 year ago

Quickest option would be to reset your plugins by executing the following commands and then opening a new terminal session, which will then download a fresh version of each of the plugins you have installed:

rm -rf $HOME/.local/share/zap/plugins/zsh-autosuggestions
rm -rf $HOME/.local/share/zap/plugins/zsh-syntax-highlighting
rm -rf $HOME/.local/share/zap/plugins/completions
rm -rf $HOME/.local/share/zap/plugins/vim
rm -rf $HOME/.local/share/zap/plugins/powerlevel10k
rm -rf $HOME/.local/share/zap/plugins/fzf
wintermi commented 1 year ago

I think the grep error may be due to the alias you have set to use rg instead. rg is not a complete drop in replacement for grep.

I would move the Zap setup commands, i.e. Lines 85-98 of your .zshrc file to the top of the .zshrc file, after line 6.

I would also comment out the grep alias.

aikenji commented 1 year ago

I think the grep error may be due to the alias you have set to use rg instead. rg is not a complete drop in replacement for grep.

I would move the Zap setup commands, i.e. Lines 85-98 of your .zshrc file to the top of the .zshrc file, after line 6.

I would also comment out the grep alias.

I tried commenting out the grep alias, and it worked. but changing the order of zap setup commands will make fzf plugins not working. maybe the reason is home-brew install path is not export at first. Thanks a lot for the quick suggestion.

wintermi commented 1 year ago

Glad it helped, will close the issue.