From 61f6f2ccd2fc556a9ad2a9203d31f6b6d7bbe881 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Thu, 11 Jun 2020 16:01:01 -0400 Subject: [PATCH] check empty command first --- tilde | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tilde b/tilde index 026bcfe..1d30979 100755 --- a/tilde +++ b/tilde @@ -291,13 +291,15 @@ case $1 in ;; *) - if [ -x "/tilde/bin/$1" ]; then + if [ -z "$1" ]; then + help_message + exit + elif [ -x "/tilde/bin/$1" ]; then prog="/tilde/bin/$1" shift exec "$prog" "$@" else - [ -z "$1" ] || \ - printf "%s not found. try %s list to see what's available\n" "$1" "$PROGNAME" + printf "%s not found. check %s list to see what's available\n\n" "$1" "$PROGNAME" help_message exit fi