
___x_cmd_df___darwin___auto(){
    if      ___x_cmd_is_stdout2tty; then        ___x_cmd_df___darwin___app
    else                                        ___x_cmd_df___darwin___tsv
    fi
}

___x_cmd_df___darwin___csv(){   ___x_cmd_df___darwin___xsv csv; }
___x_cmd_df___darwin___tsv(){   ___x_cmd_df___darwin___xsv tsv; }
___x_cmd_df___darwin___xsv(){
    ___x_cmd_df___darwin___raw | {
        mount_data="$( ___x_cmd_cmds mount )"                       \
            ___x_cmd_cmds awk -v format="${1:-tsv}"                 \
                -f "${___X_CMD_ROOT_MOD}/df/lib/awk/share.awk"      \
                -f "${___X_CMD_ROOT_MOD}/df/lib/awk/mount_mac.awk"
    }
}

# TODO: Unified with mount results ....
___x_cmd_df___darwin___raw(){
    # Notice: using /bin/df to ensure using the df comes with the macos
    if [ -z "$numeric" ]; then
        /bin/df -aYkh
    else
        /bin/df -aYk
    fi | ___x_cmd_df___raw_sort
}

___x_cmd_df___darwin___app(){
    {
        ___x_cmd_df___darwin___csv
    } | \
        ___x_cmd csv --app --clear
}

