Closed JustCauseWhyNot closed 2 years ago
You'll need to write a script to update plugins. If you keep all your plugins under ~/.zsh
(so you'll have ~/.zsh/powerlevel10k
and so on), the script can look like this:
#!/usr/bin/env zsh
#
# Usage: zsh-update
#
# Updates all plugins under ~/.zsh.
#
# It's recommended to restart zsh with `exec zsh` after running `zsh-update`.
() {
local dir
for dir in ~/.zsh/*(/); do
git -C $dir pull
done
} "$@"
Save it in zsh-update
, make the file executable and place it somewhere in your PATH
(I would use ~/bin
).
Note: I haven't tested the script. If it doesn't work, please fix it yourself.
Oh, you want it for a zshrc that compiles sources, right? If so, the easiest way would be to delete the directories and restart zsh with exec zsh
. If you keep all plugins under ~/.zsh
, that would be as simple as rm -rf ~/.zsh && exec zsh
Thank you for your assistance.
I apologize if this isn't the right format, or location to ask this question. How would one right there diy plugin manger .zshrc so that it keeps plugins updated? Would you have to write it so every time .zshrc ran it would have to clone the plugins repo?