_task-maker-rust() {
    local i cur prev opts cmd
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"
    cmd=""
    opts=""

    for i in ${COMP_WORDS[@]}
    do
        case "${cmd},${i}" in
            ",$1")
                cmd="task__maker__rust"
                ;;
            *)
                ;;
        esac
    done

    case "${cmd}" in
        task__maker__rust)
            opts="-s -t -W -v -h -V --solution --task-dir --max-depth --ui --exclusive --seed --clean --booklet-solutions --no-statement --skip-checks --store-dir --max-cache --min-cache --keep-sandboxes --dry-run --no-cache --extra-time --extra-memory --copy-exe --copy-logs --copy-dag --num-cores --evaluate-on --name --priority --verbose --help --version [FILTER]..."
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --solution)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -s)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --task-dir)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -t)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --max-depth)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --ui)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --seed)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --skip-checks)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -W)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --store-dir)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --max-cache)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --min-cache)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --no-cache)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --extra-time)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --extra-memory)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --num-cores)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --evaluate-on)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --name)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --priority)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
    esac
}

if [[ "${BASH_VERSINFO[0]}" -eq 4 && "${BASH_VERSINFO[1]}" -ge 4 || "${BASH_VERSINFO[0]}" -gt 4 ]]; then
    complete -F _task-maker-rust -o nosort -o bashdefault -o default task-maker-rust
else
    complete -F _task-maker-rust -o bashdefault -o default task-maker-rust
fi
