#compdef task-maker-rust

autoload -U is-at-least

_task-maker-rust() {
    typeset -A opt_args
    typeset -a _arguments_options
    local ret=1

    if is-at-least 5.2; then
        _arguments_options=(-s -S -C)
    else
        _arguments_options=(-s -C)
    fi

    local context curcontext="$curcontext" state line
    _arguments "${_arguments_options[@]}" : \
'*-s+[Evaluate only the solution with the specified path]:SOLUTION:_files' \
'*--solution=[Evaluate only the solution with the specified path]:SOLUTION:_files' \
'-t+[Directory of the task]:TASK_DIR:_files' \
'--task-dir=[Directory of the task]:TASK_DIR:_files' \
'--max-depth=[Look at most for this number of parents for searching the task]:MAX_DEPTH:_default' \
'--ui=[Which UI to use, available UIs are\: print, raw, curses, json]:UI:_default' \
'--seed=[Force this seed instead of a random one]:SEED:_default' \
'*-W+[List of sanity checks to skip (--help for the list)]:SKIP_SANITY_CHECKS:_default' \
'*--skip-checks=[List of sanity checks to skip (--help for the list)]:SKIP_SANITY_CHECKS:_default' \
'--store-dir=[Where to store the storage files, including the cache]:STORE_DIR:_files' \
'--max-cache=[Maximum size of the storage directory, in MiB]:MAX_CACHE:_default' \
'--min-cache=[When the storage is flushed, this is the new maximum size, in MiB]:MIN_CACHE:_default' \
'--no-cache=[Disable the cache for this comma separated list of tags]' \
'--extra-time=[Give to the solution some extra time before being killed]:EXTRA_TIME:_default' \
'--extra-memory=[Give to the solution some extra memory before being killed]:EXTRA_MEMORY:_default' \
'--num-cores=[The number of CPU cores to use]:NUM_CORES:_default' \
'--evaluate-on=[Run the evaluation on a remote server instead of locally]:EVALUATE_ON:_default' \
'--name=[The name to use for the client in remote executions]:NAME:_default' \
'--priority=[Priority of the evaluations spawned by this invocation of task-maker; no effect if running locally]:PRIORITY:_default' \
'--exclusive[Do not run in parallel time critical executions on the same machine]' \
'--clean[Clear the task directory and exit]' \
'--booklet-solutions[Include the solutions in the booklet]' \
'--no-statement[Do not build the statement files and the booklets]' \
'--keep-sandboxes[Keep all the sandbox directories]' \
'--dry-run[Do not write any file inside the task directory]' \
'--copy-exe[Copy the executables to the bin/ folder]' \
'--copy-logs[Copy the logs of some executions to the bin/logs/ folder]' \
'--copy-dag[Store the DAG in DOT format inside of bin/DAG.dot]' \
'*-v[Verbose mode (-v, -vv, -vvv, etc.). Note that it does not play well with curses ui]' \
'*--verbose[Verbose mode (-v, -vv, -vvv, etc.). Note that it does not play well with curses ui]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
'*::filter -- Execute only the solutions whose names start with the filter:_default' \
&& ret=0
}

(( $+functions[_task-maker-rust_commands] )) ||
_task-maker-rust_commands() {
    local commands; commands=()
    _describe -t commands 'task-maker-rust commands' commands "$@"
}

if [ "$funcstack[1]" = "_task-maker-rust" ]; then
    _task-maker-rust "$@"
else
    compdef _task-maker-rust task-maker-rust
fi
