# shellcheck shell=dash
___x_cmd_shim__gen_winpty(){
    local x_=
    ___x_cmd_shim__gen_winpty_ "$@"
    printf "%s\n" "$x_"
}

___x_cmd_shim__gen_winpty_(){
#     if x hascmd bash; then
#         x_="#! /bin/bash
# "
#     else
#         x_="#! /bin/sh
# "
#     fi

    x_="#! /bin/sh
"

    if [ -n "$MSYS" ] && [ -t 0 ]; then
        x_="$x_ winpty $1"
    else
        x_="$x_  $1"
    fi
}