Fix non-dropdown commands

These should not be checked as if they are programs.
profile
noctuid 7 years ago
parent b34232d299
commit 005e5bf547

@ -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

Loading…
Cancel
Save