diff options
author | EuAndreh <eu@euandre.org> | 2022-10-16 22:22:53 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-10-16 22:22:53 -0300 |
commit | 592d5e802d0e099efcaf9365a134e1f1efb5ce1c (patch) | |
tree | 0a815519505a0f56daf40b437a47fe88c8b80be8 | |
parent | bin/*.pl: Do not "use strict" explicitly (diff) | |
download | dotfiles-592d5e802d0e099efcaf9365a134e1f1efb5ce1c.tar.gz dotfiles-592d5e802d0e099efcaf9365a134e1f1efb5ce1c.tar.xz |
bin/without-env: Better handling of "--" separator
-rwxr-xr-x | bin/without-env | 4 |
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 "$@" |