aboutsummaryrefslogtreecommitdiff
path: root/bin/ak
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ak')
-rwxr-xr-xbin/ak14
1 files changed, 12 insertions, 2 deletions
diff --git a/bin/ak b/bin/ak
index 8f6305f..5724ce2 100755
--- a/bin/ak
+++ b/bin/ak
@@ -30,9 +30,13 @@ export AK_DEBUG="yes"
##
## -h, --help Prints this help message
##
+## -s, --shell Starts an interactive shell
+##
## -m, --module [module] Run a specified module. If no module provided
## the list of available modules will be printed.
##
+## -f, --function [function] Get the list of available functions
+##
## [command] [args] Run a command. If none provided a list of
## commands will be printed.
##
@@ -41,8 +45,9 @@ PROGRAM="$(basename $0)"
descriptionString="Arching Kaos CLI"
source $HOME/.arching-kaos/rc
-source $AK_LIBDIR/_ak_log
-source $AK_LIBDIR/_ak_script
+source $AK_LIBDIR/_ak_lib_load
+_ak_lib_load _ak_log
+_ak_lib_load _ak_script
if [ $# -eq 0 ]
then
@@ -148,6 +153,10 @@ case "$1" in
$subcmd/main.sh $subargs
_ak_exit_program $? "$subcmd module finished";
;;
+ -s|--shell)
+ rlwrap ak sh -s
+ _ak_exit_program $? "Shell terminated";
+ ;;
esac
if [ -f "$AK_BINDIR/ak-$subcmd" ]
@@ -170,6 +179,7 @@ else
fi
counter=$(($counter + 1))
done
+ _ak_usage
find $AK_BINDIR | while read available
do
echo $(basename $available) |\