From 6181c3479de2e4d13bfc9650363d037d69043fad Mon Sep 17 00:00:00 2001 From: kaotisk Date: Mon, 8 Jul 2024 23:29:36 +0300 Subject: Calling a module with no arguments calls it with --help --- bin/ak | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/ak b/bin/ak index edf439d..f1a399b 100755 --- a/bin/ak +++ b/bin/ak @@ -62,13 +62,17 @@ case "$1" in shift subcmd="$AK_MODULESDIR/$(echo $1 | sed -e 's/ /-/g')" shift - if [ -z $1 ] || [ ! -n "$*" ] + if [ ! -n $1 ] then _ak_log_error "No module selected" ls -1 $AK_MODULESDIR exit 1 fi subargs="$*" + if [ ! -n $subargs ] + then + subargs="--help" + fi if [ ! -f $subcmd/main.sh ] then _ak_log_error "No $(basename $subcmd) module" -- cgit v1.2.3