From e3350af5b8d7fdfba49f7ec692cd8a95aeb3f9a9 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Sun, 12 Jun 2022 14:14:40 +0200 Subject: [zshrc]: add helper to update zsh plugins --- zshrc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'zshrc') diff --git a/zshrc b/zshrc index c5eca53..991b5cd 100644 --- a/zshrc +++ b/zshrc @@ -11,6 +11,15 @@ ZDOTDIR=$HOME/.cache/zsh function zshPlug() { local install=$HOME/.zshplug + if [[ $1 == "update" ]]; then + for dir in $install/**/.git; do + local repo=$(dirname $dir) + echo "=> Updating $repo" + git -C $repo pull + done + return + fi + # Positinal: # $1: Github repository. # Arguments: -- cgit v1.2.3