diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-07-08 23:29:36 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-07-08 23:29:36 +0300 |
commit | 6181c3479de2e4d13bfc9650363d037d69043fad (patch) | |
tree | a052597df057062ddc69e6c07d52e3228033a9e4 /bin | |
parent | f10a9274bf7f0fb4daee5502edd8dec44550ac1f (diff) | |
download | arching-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
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ak | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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" |