aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-07-08 23:29:36 +0300
committerkaotisk <kaotisk@arching-kaos.org>2024-07-08 23:29:36 +0300
commit6181c3479de2e4d13bfc9650363d037d69043fad (patch)
treea052597df057062ddc69e6c07d52e3228033a9e4
parentf10a9274bf7f0fb4daee5502edd8dec44550ac1f (diff)
downloadarching-kaos-tools-6181c3479de2e4d13bfc9650363d037d69043fad.tar.gz
arching-kaos-tools-6181c3479de2e4d13bfc9650363d037d69043fad.tar.bz2
arching-kaos-tools-6181c3479de2e4d13bfc9650363d037d69043fad.zip
Calling a module with no arguments calls it with --help
-rwxr-xr-xbin/ak6
1 files changed, 5 insertions, 1 deletions
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"