# Author:       Li Junhao       l@x-cmd.com
# shellcheck    shell=sh        disable=SC2039,SC1090,SC3043,SC2263

___x_cmd log init abox

xrc:mod:lib     abox   main     start/_index

___x_cmd_abox(){
    [ "$#" -gt 0 ]  ||  set -- --help

    local op="$1";      shift
    case "$op" in
        -h|--help)      ___x_cmd help -m abox       "$@" ;;

        start|stop|restart|pause|resume|ls|fz|cmd|cmdi|clearall|rm|home)
                        ___x_cmd_abox_"$op"         "$@" ;;

        t|tmux)         ___x_cmd_abox_tmux          "$@" ;;

        :*)             ___x_cmd_abox_tmux "$op"    "$@" ;;
        *:*)            ___x_cmd_abox_tmux "$op"    "$@" ;;

        --)             ___x_cmd_abox_cmdi          "$@" ;;
        *)              ___x_cmd_abox_cmdi "$op"    "$@" ;;
    esac
}

xrc setmain ___x_cmd_abox
