
___x_cmd_host_cat(){
    [ $# -eq 0 ] || case "$1" in
        -h|--help)  ___x_cmd help -m host cat "$@" ; return 0 ;;
    esac
    ___x_cmd_cmds_awk '
        NF == 0   { next; }
        $1 ~ "^#" { next; }
        {
            printf("%15s", $1)
            printf("%s", "  ")
            printf("%20s\n", $2)
        }
    ' < "$___X_CMD_HOST_FILEPATH"
}

___x_cmd_host_fz(){
    [ $# -eq 0 ] || case "$1" in
        -h|--help)  ___x_cmd help -m host fz "$@" ; return 0 ;;
    esac
    ___x_cmd_host_catcolor | FZF_DEFAULT_OPTS="
--ansi
--reverse
--height='80%'
"   ___x_cmd fzf
}

___x_cmd_host_catcolor(){
    local limit="${1:-0}"
    ___x_cmd_host_cat | ___x_cmd_cmds awk -v limit="$limit" -f "$___X_CMD_ROOT_MOD/host/lib/color.awk"
}

___x_cmd_host_app(){
    [ $# -eq 0 ] || case "$1" in
        -h|--help)  ___x_cmd help -m host app "$@" ; return 0 ;;
    esac
    if ___x_cmd_is_stdout2tty; then
        ___x_cmd_host_catcolor 20 || {
            host:info "To avoid screen flush, TTY output is limited to 20 lines."
            host:info \
                --cmd1 "x host fz"      \
                --cmd2 "x host cat"     \
                "If you want to output all of the entries in the tty, try the commands below."
        }
    else
        ___x_cmd_host_cat
    fi
}
