
# Doc: no need to increase mind burden
# TODO:
___x_cmd_docker_image_save(){
    local tgt_fp=""
    while [ $# -gt 0 ]; do
        case "$1" in
            -o|--output)        tgt_fp="$2";    shift 2 ;;
            *)                  break
        esac
    done

    case "$tgt_fp" in
        # Add more formats to support.
        *.tar.gz|*.tgz|*.tar.xz|*.txz|*.tar.zst)
                    ___x_cmd_cmds docker save "$@" | ___x_cmd zuz z - "$tgt_fp" ;;

        "")         ___x_cmd_cmds docker save "$@" ;;
        *)          ___x_cmd_cmds docker save -o "$tgt_fp" "$@" ;;
    esac
}
