Signed-off-by: Jani Nikula <[email protected]>
---
dim | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/dim b/dim
index 989674ab7a91..fc72cd619dbd 100755
--- a/dim
+++ b/dim
@@ -1840,11 +1840,12 @@ if ! declare -n subcmd=dim_alias_${subcommand//-/_} &>
/dev/null || \
subcmd="$subcommand"
fi
-# if there's a function by the subcommand name, call it
+# look up the function by the subcommand name
subcmd_func=dim_${subcmd//-/_}
-if declare -f $subcmd_func >/dev/null; then
- $subcmd_func "$@"
-else
+if ! declare -f $subcmd_func >/dev/null; then
echoerr "'$subcommand' is not a dim command."
dim_usage
+ exit 1
fi
+
+$subcmd_func "$@"
--
2.1.4
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx