Closed mustaqimM closed 5 years ago
I think the biggest conceptual difference between zr
and other package managers, is that all zr does is manage git repositories, and creates a init.zsh
that you can load however you wish. I am open to suggestions to have the load
then source that init.zsh, but generally it feels like a nicer separation for me.
So you can see how I load git aliases from prezto
# make relevant files and directories if not found
test -d ~/.zr || mkdir $_
test -f ~/.zr/init.zsh || touch $_
# if my zshrc is newer than ~/.zr/init.zsh, regenerate the **init.zsh**
[[ ~/.zshrc -nt ~/.zr/init.zsh ]] && {
zr load sorin-ionescu/prezto/modules/git/alias.zsh \
sorin-ionescu/prezto/modules/history/init.zsh \
sorin-ionescu/prezto/modules/osx/init.zsh \
sorin-ionescu/prezto/modules/homebrew/init.zsh
}
# load ~/.zr/init.zsh
source ~/.zr/init.zsh
This means every time i edit ~/.zshrc, im sure to have the latest plugins (added or removed) in the next opened prompt. I would love to reduce the boilerplate.
re: prezto git plugin, I just source the aliases directly, as seen above. If that is enough for you as well, great. If you want the entire git plugin, could you make a new zr issue describing just that problem? It would help me keep track of things better.
lemme know if this is still an issue
I wanted to use the prezto alias package so I added it to the
.zshrc
file:zsh-users/prezto/modules/git/alias.zsh \
but
zr
doesn't ask to download it if it's in.zshrc
and the terminal is started so for each and every package I had to run:zr load url/ofpackage
and then still add it to my.zshrc
file. Is this how installing packages is done?The above error was trying to load and use in one go, which I thought would work from the example in the wiki.
Anyway, thank you so much for this, it's blazing fast even with the same amount of plugins I have on
zplug
, though I wish it used the same syntax aszplug
(especially when it comes to commenting out packages). It also seems to have a problem with oh-my-zsh packages, I can't use thegit
plugin without some compdef errors. (Sorry for mixing so many thoughts into one issue, I don't want to open one for every one)