Commit 8754ad54 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Improved command_not_found_handle

command_not_found_handle only shows usage for cmd_* commands and a
generic not found message for anything else.
parent 88a9b63a
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -193,8 +193,15 @@ cmd_help ()

command_not_found_handle ()
{
	case "$1" in
		cmd_*)
			usage
	exit 1
			;;
		*)
			echo "command not found: $1"
			return 127
			;;
	esac
}

cmd_$1 "$@"