# shellcheck shell=dash

# default enable history record
xrc:mod:lib history     stat ls/_index env predict sortfornext util

export HISTSIZE=10000       # Do the sync
export HISTFILESIZE=10000

___x_cmd_history___main(){
    [ "$#" -gt 0 ]  ||   set -- stat

    local op="$1"; shift
    case "$op" in
        --help|-h)  x help -m history ;;

        s|stat)     ___x_cmd_history_stat "$@"          ;;
        sync)       ___x_cmd_history_sync "$@"          ;;
        predict|env|ls|last|last_)
                    ___x_cmd_history_"$op" "$@"         ;;

        *)          N=history M="Unknown [subcmd=$op]" log:ret:64 ;;
    esac
}

___x_cmd_history_sync(){
    N=history M="Currently unsupported [subcmd=$op]" log:ret:64
}
