From 7442bf9b31da27ec940c319e883c0ef12ded6b3b Mon Sep 17 00:00:00 2001 From: noctuid Date: Tue, 26 Jan 2016 23:10:57 -0500 Subject: [PATCH] Deal with short options in positinal arg check --- tdrop | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tdrop b/tdrop index 622d01a..216584a 100755 --- a/tdrop +++ b/tdrop @@ -114,7 +114,8 @@ done program=${*:0-1} # ensure that positional argument exists -if [[ -z $program ]] || [[ $program =~ ^- ]]; then +if [[ -z $program ]] || [[ $program =~ ^- ]] || \ + [[ ${*:0-2:1} =~ ^-[b-ln-z]$ ]]; then echo "1 positional argument is required." \ "For help use -h or --help or see the manpage." | \ tee -a /tmp/tdrop/log