aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-10-16 22:22:53 -0300
committerEuAndreh <eu@euandre.org>2022-10-16 22:22:53 -0300
commit592d5e802d0e099efcaf9365a134e1f1efb5ce1c (patch)
tree0a815519505a0f56daf40b437a47fe88c8b80be8
parentbin/*.pl: Do not "use strict" explicitly (diff)
downloaddotfiles-592d5e802d0e099efcaf9365a134e1f1efb5ce1c.tar.gz
dotfiles-592d5e802d0e099efcaf9365a134e1f1efb5ce1c.tar.xz
bin/without-env: Better handling of "--" separator
-rwxr-xr-xbin/without-env4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/without-env b/bin/without-env
index 4f8fb14..685472d 100755
--- a/bin/without-env
+++ b/bin/without-env
@@ -64,6 +64,8 @@ eval "$(assert-arg "${3:-}" '--')"
eval "export $1=\"\$(echo \"\$$1\" | sed \"s|\$2:||g\")\""
shift # drop $1
shift # drop $2
-shift # drop --
+if [ "${1:-}" = '--' ]; then
+ shift # drop --
+fi
"$@"