From fb60bd6642f7fb6b12ad76ca5bbb644558bcac9b Mon Sep 17 00:00:00 2001 From: noctuid Date: Mon, 1 Feb 2016 14:12:45 -0500 Subject: [PATCH] Add support for long options without = Closes #12 --- tdrop | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tdrop b/tdrop index 68e14f4..8e855d1 100755 --- a/tdrop +++ b/tdrop @@ -84,9 +84,10 @@ do OPTION=${OPTARG%%=*} OPTARG=${OPTARG#*=} else - echo "Long options with args must be written as --opt=val." | \ - tee -a /tmp/tdrop/log - exit 1 + OPTION=$OPTARG + # shellcheck disable=SC2124 + OPTARG=${@:$OPTIND:1} + ((OPTIND++)) fi case $OPTION in height) height=$OPTARG;;