about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2024-02-24 11:19:06 +0100
committerSoispha <soispha@vhack.eu>2024-02-24 11:19:06 +0100
commit4c818db14297e01e39f3b611e185b3494187ee6c (patch)
tree0de187b24ff2e6f5d1b5fd74eec6be9f0bad5de7
parentchore(version): v1.32.0 (diff)
downloadnixos-config-4c818db14297e01e39f3b611e185b3494187ee6c.tar.gz
nixos-config-4c818db14297e01e39f3b611e185b3494187ee6c.zip
fix(hm/pkgs/git-edit-index): Correctly exit when parsing options
Diffstat (limited to '')
-rwxr-xr-xhm/soispha/pkgs/scripts/apps/git-edit-index.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/hm/soispha/pkgs/scripts/apps/git-edit-index.sh b/hm/soispha/pkgs/scripts/apps/git-edit-index.sh
index 2088c314..5233b41b 100755
--- a/hm/soispha/pkgs/scripts/apps/git-edit-index.sh
+++ b/hm/soispha/pkgs/scripts/apps/git-edit-index.sh
@@ -80,14 +80,17 @@ for arg in "$@"; do
     case "$arg" in
     "--help" | "-h")
         help
+        exit 0
         ;;
     "--version" | "-v")
         version
+        exit 0
         ;;
     "--")
-        break
+        end_of_cli_options=true
         ;;
     esac
+    [ "$end_of_cli_options" = "true" ] && break
 done
 
 edit "$@"