# shellcheck shell=dash
___x_cmd log init pandoc

xrc:mod:lib     pandoc

___x_cmd_pandoc___main(){
    [ "$#" -gt 0 ] || {
        ___x_cmd_pandoc___cmd
        return
    }

    local op="$1";          shift
    case "$op" in
        -h|--help)      ___x_cmd help -m pandoc         "$@" ;;
        --|--cmd)       ___x_cmd_pandoc___cmd           "$@" ;;
        *)              ___x_cmd_pandoc___cmd "$op"     "$@" ;;
    esac
}


___x_cmd_pandoc___cmd(){
    if ___x_cmd_hascmd pandoc; then
        ___x_cmd_pandoc___cmd(){
            command pandoc "$@"
        }
        ___x_cmd_pandoc___cmd "$@"
        return
    fi

    ___x_cmd pkg xbin init pandoc
    # x pixi exec pandoc
    ___x_cmd_pandoc "$@"
}
