From f8952225cf3d5f5a96d604a5df4904d67e2f1c44 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Thu, 20 Jan 2022 00:13:05 +0400 Subject: [PATCH] foreach: rendre -g et -S compatibles --- foreach | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/foreach b/foreach index 445c008..6f4fc2c 100755 --- a/foreach +++ b/foreach @@ -83,7 +83,7 @@ OPTIONS répertoire parent (valide uniquement avec l'option -p) -S, --git-status Equivalent à spécifier la commande 'git status --p' - Utiliser avec -G ou -C + Utiliser par exemple avec -g, -G ou -C -G, --git-projects Equivalent à '--ptitle -p */.git --' e.g '$scriptname -G git pull' pour mettre à jour les dépôts situés dans un répertoire @@ -124,7 +124,11 @@ parse_args "$@"; set -- "${args[@]}" case "$command" in git-status-p) - set -- git status --p "$@" + if [ -n "$shortcut" ]; then + set -- git status --p "$@" + else + set -- "$@" -- git status --p + fi ;; esac case "$shortcut" in