# shellcheck shell=dash
___x_cmd_ted___gum_(){
    ___x_cmd_cmds_cat >/dev/tty <<A
Notice: Using gum to write.
Using Ctrl-D to finish input.
Using Ctrl-C to interrupt and then you can switch other editor like vim, gum, or other
A
    # x ui select yes yes-and-never-show-this

    x_=$(x gum write --width 0 --value "$*") || {
        printf "\r%s\n" "Received interrupt" >/dev/tty
        # TODO: you can choose to quit with 130 or switch editor here
        return 130
    }
}

___x_cmd_ted___gum(){
    local x_=""
    ___x_cmd_ted___gum_ "$@" || return
    printf "%s\n" "$x_"
}
