-
Notifications
You must be signed in to change notification settings - Fork 137
Migrating from zinit to zdharma continuum
vladislav doster edited this page May 12, 2022
·
2 revisions
When psprint deleted the original repository, zinit
and some other zdharma
applications were
broken. That is because zinit
is set to pull from the zdharma
repo, which is
now gone. Plugins hosted by the zdharma
organization were broken in the same way.
To get rid of the git errors and to restore the ability to receive updates from this 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@'
- In your Zinit git directory, update the git remote:
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 && \
zinit update --urge
Alternatively, you can reinstall zinit
entirely and follow the installation instructions.
here.
Find issues opened in zdharma/zinit
here