From 005e5bf54772863b34bc7de9005e61163a681d1d Mon Sep 17 00:00:00 2001 From: noctuid Date: Thu, 14 Sep 2017 19:15:48 -0400 Subject: [PATCH] Fix non-dropdown commands These should not be checked as if they are programs. --- tdrop | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tdrop b/tdrop index f30c075..1e40ff2 100755 --- a/tdrop +++ b/tdrop @@ -165,7 +165,8 @@ shift "$((OPTIND-1))" program=$1 # check that the program is not a path and does not contain flags -if ! type "$program" 2> /dev/null; then +if [[ ! $program =~ ^(current|auto_hide|auto_show|toggle_auto_hide)$ ]] && \ + ! type "$program" 2> /dev/null; then echo >&2 "The program should be in PATH and not contain flags." | \ tee -a "$MUTDROP_PATH"/log exit 1