# shellcheck shell=dash


___x_cmd_open_main(){
    case "$1" in
        -h|--help)
            ___x_cmd help -m open 1>&2
            return 1 ;;

        *)   ___x_cmd_open_run "$@"
    esac
}


___x_cmd_open_run(){
    ___x_cmd os name_
    case "$___X_CMD_OS_NAME_" in
        darwin|linux|win)
            xrc:mod:lib     open    "$___X_CMD_OS_NAME_"
            ___x_cmd hascmd ___x_cmd_open___main || return 1
            ___x_cmd_open_run(){
                ___x_cmd_open___main "$@"
            }
            ___x_cmd_open_run "$@"
            ;;
        *)
            x:error "Unsupported operating system ==> $___X_CMD_OS_NAME_"
            return 1
            ;;
    esac
}

