-
Notifications
You must be signed in to change notification settings - Fork 129
Migrating from zinit to zdharma continuum
vladislav doster edited this page May 12, 2022
·
2 revisions
After @psprint deleted the zdharma
organization, Zinit and most annexes broke. To get rid of the git errors and receive updates from the `zdharma-continuum fork, follow these steps:
- Change all references to
zdharma
,Zsh-Packages
, andzinit-zsh
in your dotfiles (e.g.,.zshrc
,.zprofile
) tozdharma-continuum
(example)
For the default added annexes, change them to
zinit light-mode for \
zdharma-continuum/zinit-annex-{'readurl','bin-gem-node','patch-dl','rust'}
You can use the following command to make the changes for you automatically. Be sure to double check the results and fix any issues before continuing.
find . -name '.git*' -type d -prune -name '.idea*' -type d -prune -o -type f -print0 |
xargs -0 sed -i \
-e 's@(zdharma|Zsh-Packages|zinit-zsh)/@zdharma-continuum/@' \
-e 's@/z-a-readurl@/zinit-annex-readurl@' \
-e 's@/z-a-bin-gem-node@/zinit-annex-bin-gem-node@' \
-e 's@/z-a-bin-rust@/zinit-annex-rust@' \
-e 's@/z-a-patch-dl@/zinit-annex-patch-dl@'
- Update the git remote in your `$ZINIT[BIN_DIR] directory:
cd $ZINIT[BIN_DIR] \
&& git remote set-url origin https://github.com/zdharma-continuum/zinit.git \
&& git fetch origin \
&& git branch -m master main \
&& git branch -u origin/main main \
&& git remote set-head origin -a \
&& cd -
- Start a new Zsh session, delete all Zinit plugins, and reinstall them
zinit delete --all --yes && exec zsh
Alternatively, you can reinstall zinit
entirely and follow the installation instructions here.