#compdef hq

autoload -U is-at-least

_hq() {
    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[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
":: :_hq_commands" \
"*::: :->hyperqueue" \
&& ret=0
    case $state in
    (hyperqueue)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:hq-command-$line[1]:"
        case $line[1] in
            (server)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_hq__server_commands" \
"*::: :->server" \
&& ret=0

    case $state in
    (server)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:hq-server-command-$line[1]:"
        case $line[1] in
            (start)
_arguments "${_arguments_options[@]}" : \
'--host=[Hostname/IP of the machine under which is visible to others, default\: hostname]:HOST:_default' \
'--idle-timeout=[Duration after which will an idle worker automatically stop.  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:IDLE_TIMEOUT:_default' \
'--client-port=[Port for client connections (used e.g. for \`hq submit\`)]:CLIENT_PORT:_default' \
'--worker-port=[Port for worker connections]:WORKER_PORT:_default' \
'--journal=[Path to a journal file where events is stored. If the file already exists, the file is used to restore the server state]:JOURNAL:_files' \
'--journal-flush-period=[Configure how often should be the journal written.  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:JOURNAL_FLUSH_PERIOD:_default' \
'--access-file=[Path to access file that is used for configuration of secret keys and ports]:ACCESS_FILE:_files' \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--disable-client-authentication-and-encryption[If set, client connection will NOT be AUTHENTICATED and ENCRYPTED. ANYONE CAN CONNECT TO THE SERVER AS CLIENT! USE AT YOUR OWN RISK]' \
'--disable-worker-authentication-and-encryption[If set, worker connection will NOT be AUTHENTICATED and ENCRYPTED. ANYONE CAN CONNECT TO THE SERVER AS WORKER! USE AT YOUR OWN RISK]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(stop)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(info)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(generate-access)
_arguments "${_arguments_options[@]}" : \
'--client-file=[Target filename of the access file for client that will be generated]:CLIENT_FILE:_files' \
'--worker-file=[Target filename of the access file for worker that will be generated]:WORKER_FILE:_files' \
'--host=[Override target host name, otherwise local hostname is used]:HOST:_default' \
'--client-host=[Override target host name for clients]:CLIENT_HOST:_default' \
'--worker-host=[Override target host name for workers]:WORKER_HOST:_default' \
'--client-port=[Port for connecting client]:CLIENT_PORT:_default' \
'--worker-port=[Port for connecting workers]:WORKER_PORT:_default' \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':access_file -- Target filename of the full access file that will be generated:_files' \
&& ret=0
;;
        esac
    ;;
esac
;;
(job)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_hq__job_commands" \
"*::: :->job" \
&& ret=0

    case $state in
    (job)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:hq-job-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
'*--filter=[Display only jobs with the given states. You can use multiple states separated by a comma]:FILTER:(waiting running finished failed canceled opened)' \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'(--filter)--all[Display all jobs]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(summary)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(info)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':selector -- Single ID, ID range or `last` to display the most recently submitted job:_default' \
&& ret=0
;;
(cancel)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':selector -- Select job(s) to cancel:_default' \
&& ret=0
;;
(forget)
_arguments "${_arguments_options[@]}" : \
'*--filter=[Forget only jobs with the given states. You can use multiple states separated by a comma. You can only filter by states that mark a completed job]:FILTER:(finished failed canceled)' \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':selector -- Select job(s) to forget:_default' \
&& ret=0
;;
(cat)
_arguments "${_arguments_options[@]}" : \
'--tasks=[Filter task(s) by ID]:TASKS:_default' \
'*--task-status=[Filter task(s) by status. You can use multiple states separated by a comma]:TASK_STATUS:(waiting running finished failed canceled opened)' \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--print-task-header[Prepend the output of each task with a header line that identifies the task which produced that output]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':job_selector -- Select specific job:_default' \
':stream -- Type of output stream to display:((stdout\:"Displays stdout output stream for given job and task(s)"
stderr\:"Displays stderr output stream for given job and task(s)"))' \
&& ret=0
;;
(submit)
_arguments "${_arguments_options[@]}" : \
'--name=[Name of the job]:NAME:_default' \
'--max-fails=[Maximum number of permitted task failures. If this limit is reached, the job will fail immediately]:MAX_FAILS:_default' \
'(--pin --cpus)--nodes=[Number of nodes; 0]:NODES:_default' \
'--cpus=[Number and placement of CPUs for each job]:CPUS:_default' \
'*--resource=[Generic resource request in the form <NAME>=<AMOUNT>]:RESOURCE:_default' \
'--time-request=[Minimal lifetime of the worker needed to start the job  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:TIME_REQUEST:_default' \
'--pin=[Pin the job to the cores specified in \`--cpus\`]:PIN:(taskset omp)' \
'--cwd=[Working directory for the submitted job. The path must be accessible from worker nodes \[default\: %{SUBMIT_DIR}\]]:CWD:_files' \
'--stdout=[Path where the standard output of the job will be stored. The path must be accessible from worker nodes]:STDOUT:_default' \
'--stderr=[Path where the standard error of the job will be stored. The path must be accessible from worker nodes]:STDERR:_default' \
'*--env=[Specify additional environment variable for the job. You can pass this flag multiple times to pass multiple variables]:ENV:_default' \
'--each-line=[Create a task array where a task will be created for each line of the given file. The corresponding line will be passed to the task in environment variable \`HQ_ENTRY\`]:EACH_LINE:_files' \
'(--each-line)--from-json=[Create a task array where a task will be created for each item of a JSON array stored in the given file. The corresponding item from the array will be passed as a JSON string to the task in environment variable \`HQ_ENTRY\`]:FROM_JSON:_files' \
'--array=[Create a task array where a task will be created for each number in the specified number range. Each task will be passed an environment variable \`HQ_TASK_ID\`]:ARRAY:_default' \
'--priority=[Priority of each task]:PRIORITY:_default' \
'--time-limit=[Time limit per task. E.g. --time-limit=10min  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:TIME_LIMIT:_default' \
'--stream=[Stream the output of tasks into this log file]:STREAM:_files' \
'--crash-limit=[Limits how many times may task be in a running state while worker is lost. If the limit is reached, the task is marked as failed. If the limit is zero, the limit is disabled]:CRASH_LIMIT:_default' \
'--job=[Attach a submission to an open job]:JOB:_default' \
'--directives=[Select directives parsing mode]:DIRECTIVES:(auto file stdin off)' \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--task-dir[Create a temporary directory for task, path is provided in HQ_TASK_DIR The directory is automatically deleted when task is finished]' \
'(--progress)--wait[Wait for the job to finish]' \
'(--wait)--progress[Interactively observe the progress of the submitted job]' \
'--stdin[Capture stdin and start the task with the given stdin; the job will be submitted when the stdin is closed]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::commands -- Command that should be executed by each task:_default' \
&& ret=0
;;
(submit-file)
_arguments "${_arguments_options[@]}" : \
'--job=[Attach a submission to an open job]:JOB:_default' \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':path -- Path to file with job definition:_files' \
&& ret=0
;;
(wait)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--without-close[Wait until all tasks are completed, even if the job is still open]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':selector -- Select job(s) to wait for:_default' \
&& ret=0
;;
(progress)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':selector -- Select job(s) to observe:_default' \
&& ret=0
;;
(task-ids)
_arguments "${_arguments_options[@]}" : \
'*--filter=[Select only tasks with given state(s) You can use multiple states separated by a comma]:FILTER:(waiting running finished failed canceled opened)' \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':selector -- Single ID, ID range or `last` to display the most recently submitted job:_default' \
&& ret=0
;;
(open)
_arguments "${_arguments_options[@]}" : \
'--name=[Name of the job]:NAME:_default' \
'--max-fails=[Maximum number of permitted task failures. If this limit is reached, the job will fail immediately]:MAX_FAILS:_default' \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(close)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':selector -- Select job(s) to close:_default' \
&& ret=0
;;
        esac
    ;;
esac
;;
(task)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_hq__task_commands" \
"*::: :->task" \
&& ret=0

    case $state in
    (task)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:hq-task-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
'--tasks=[Filter task(s) by ID]:TASKS:_default' \
'*--task-status=[Filter task(s) by status. You can use multiple states separated by a comma]:TASK_STATUS:(waiting running finished failed canceled opened)' \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'*-v[Use this flag to enable verbose output]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':job_selector -- Select specific job(s):_default' \
&& ret=0
;;
(info)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'*-v[Use this flag to enable verbose output]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':job_selector -- Select specific job:_default' \
':task_selector -- Select specific task(s):_default' \
&& ret=0
;;
        esac
    ;;
esac
;;
(submit)
_arguments "${_arguments_options[@]}" : \
'--name=[Name of the job]:NAME:_default' \
'--max-fails=[Maximum number of permitted task failures. If this limit is reached, the job will fail immediately]:MAX_FAILS:_default' \
'(--pin --cpus)--nodes=[Number of nodes; 0]:NODES:_default' \
'--cpus=[Number and placement of CPUs for each job]:CPUS:_default' \
'*--resource=[Generic resource request in the form <NAME>=<AMOUNT>]:RESOURCE:_default' \
'--time-request=[Minimal lifetime of the worker needed to start the job  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:TIME_REQUEST:_default' \
'--pin=[Pin the job to the cores specified in \`--cpus\`]:PIN:(taskset omp)' \
'--cwd=[Working directory for the submitted job. The path must be accessible from worker nodes \[default\: %{SUBMIT_DIR}\]]:CWD:_files' \
'--stdout=[Path where the standard output of the job will be stored. The path must be accessible from worker nodes]:STDOUT:_default' \
'--stderr=[Path where the standard error of the job will be stored. The path must be accessible from worker nodes]:STDERR:_default' \
'*--env=[Specify additional environment variable for the job. You can pass this flag multiple times to pass multiple variables]:ENV:_default' \
'--each-line=[Create a task array where a task will be created for each line of the given file. The corresponding line will be passed to the task in environment variable \`HQ_ENTRY\`]:EACH_LINE:_files' \
'(--each-line)--from-json=[Create a task array where a task will be created for each item of a JSON array stored in the given file. The corresponding item from the array will be passed as a JSON string to the task in environment variable \`HQ_ENTRY\`]:FROM_JSON:_files' \
'--array=[Create a task array where a task will be created for each number in the specified number range. Each task will be passed an environment variable \`HQ_TASK_ID\`]:ARRAY:_default' \
'--priority=[Priority of each task]:PRIORITY:_default' \
'--time-limit=[Time limit per task. E.g. --time-limit=10min  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:TIME_LIMIT:_default' \
'--stream=[Stream the output of tasks into this log file]:STREAM:_files' \
'--crash-limit=[Limits how many times may task be in a running state while worker is lost. If the limit is reached, the task is marked as failed. If the limit is zero, the limit is disabled]:CRASH_LIMIT:_default' \
'--job=[Attach a submission to an open job]:JOB:_default' \
'--directives=[Select directives parsing mode]:DIRECTIVES:(auto file stdin off)' \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--task-dir[Create a temporary directory for task, path is provided in HQ_TASK_DIR The directory is automatically deleted when task is finished]' \
'(--progress)--wait[Wait for the job to finish]' \
'(--wait)--progress[Interactively observe the progress of the submitted job]' \
'--stdin[Capture stdin and start the task with the given stdin; the job will be submitted when the stdin is closed]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::commands -- Command that should be executed by each task:_default' \
&& ret=0
;;
(worker)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_hq__worker_commands" \
"*::: :->worker" \
&& ret=0

    case $state in
    (worker)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:hq-worker-command-$line[1]:"
        case $line[1] in
            (start)
_arguments "${_arguments_options[@]}" : \
'--cpus=[How many cores should be allocated for the worker]:CPUS:_default' \
'*--resource=[Resources provided by the worker]:RESOURCE:_default' \
'--group=[Manual configuration of worker'\''s group Workers from the same group are used for multi-node tasks]:GROUP:_default' \
'--idle-timeout=[Duration after which will an idle worker automatically stop.  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:IDLE_TIMEOUT:_default' \
'--overview-interval=[How often should the worker send its overview status (e.g. HW usage, task status) to the server for monitoring. Set to "0s" to disable overview updates]:OVERVIEW_INTERVAL:_default' \
'--heartbeat=[How often should the worker announce its existence to the server.  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:HEARTBEAT:_default' \
'--time-limit=[Worker time limit. Worker exits after given time.  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:TIME_LIMIT:_default' \
'--manager=[What HPC job manager should be used by the worker]:MANAGER:(detect none pbs slurm)' \
'--hostname=[Overwrite worker hostname]:HOSTNAME:_default' \
'--on-server-lost=[Behavior when a connection to a server is lost]:ON_SERVER_LOST:(stop finish-running)' \
'--work-dir=[Working directory of a worker. Temp directory by default. It should *NOT* be placed on a network filesystem]:WORK_DIR:_files' \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--no-detect-resources[Disable auto-detection of resources]' \
'--no-hyper-threading[Ignore hyper-threading while detecting CPU cores]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(stop)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':selector_arg -- Select worker(s) to stop:_default' \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
'--filter=[Select only workers with the given state]:FILTER:(running offline)' \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'(--filter)--all[Display all workers]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(hwdetect)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--no-hyper-threading[Detect only physical cores]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(info)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':worker_id -- Worker ID:_default' \
&& ret=0
;;
(address)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':worker_id -- Worker ID:_default' \
&& ret=0
;;
(wait)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':worker_count -- Number of worker(s) to wait on:_default' \
&& ret=0
;;
(deploy-ssh)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--show-output[Show log output of the spawned worker(s)]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':hostfile -- Path to a file that contains the hostnames to which should HQ workers be deployed to. Each line in the file should correspond to one hostname address:_files' \
'*::worker_start_args -- Arguments passed to `worker start` at the remote node. To display possible options, use `deploy-ssh -- --help`:_default' \
&& ret=0
;;
        esac
    ;;
esac
;;
(output-log)
_arguments "${_arguments_options[@]}" : \
'--server-uid=[Filter files for given server instance]:SERVER_UID:_default' \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':path -- Path of log file:_files' \
":: :_hq__output-log_commands" \
"*::: :->output-log" \
&& ret=0

    case $state in
    (output-log)
        words=($line[2] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:hq-output-log-command-$line[2]:"
        case $line[2] in
            (summary)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(jobs)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(show)
_arguments "${_arguments_options[@]}" : \
'--job=[JobId]:JOB:_default' \
'--channel=[Filter only specific channel]:CHANNEL:(stdout stderr)' \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(cat)
_arguments "${_arguments_options[@]}" : \
'--task=[Print only the specified task(s) output. You can use the array syntax to specify multiple tasks]:TASK:_default' \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--allow-unfinished[Allow unfinished channel]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':job -- JobId:_default' \
':channel -- Channel name\: "stdout" or "stderr":(stdout stderr)' \
&& ret=0
;;
(export)
_arguments "${_arguments_options[@]}" : \
'--task=[Export only the specified task(s) output. You can use the array syntax to specify multiple tasks]:TASK:_default' \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':job -- Job to export:_default' \
&& ret=0
;;
        esac
    ;;
esac
;;
(alloc)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_hq__alloc_commands" \
"*::: :->alloc" \
&& ret=0

    case $state in
    (alloc)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:hq-alloc-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(info)
_arguments "${_arguments_options[@]}" : \
'--filter=[Display only allocations with the given state]:FILTER:(queued running finished failed)' \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':queue -- ID of the allocation queue:_default' \
&& ret=0
;;
(add)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_hq__alloc__add_commands" \
"*::: :->add" \
&& ret=0

    case $state in
    (add)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:hq-alloc-add-command-$line[1]:"
        case $line[1] in
            (pbs)
_arguments "${_arguments_options[@]}" : \
'-b+[How many jobs should be waiting in the queue to be started]:BACKLOG:_default' \
'--backlog=[How many jobs should be waiting in the queue to be started]:BACKLOG:_default' \
'-t+[Time limit (walltime) of PBS/Slurm allocations.  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:TIME_LIMIT:_default' \
'--time-limit=[Time limit (walltime) of PBS/Slurm allocations.  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:TIME_LIMIT:_default' \
'-w+[How many workers (nodes) should be spawned in each allocation]:WORKERS_PER_ALLOC:_default' \
'--workers-per-alloc=[How many workers (nodes) should be spawned in each allocation]:WORKERS_PER_ALLOC:_default' \
'--max-worker-count=[Maximum number of workers that can be queued or running at any given time in this queue]:MAX_WORKER_COUNT:_default' \
'-n+[Name of the allocation queue (for debug purposes only)]:NAME:_default' \
'--name=[Name of the allocation queue (for debug purposes only)]:NAME:_default' \
'--cpus=[How many cores should be allocated for the worker]:CPUS:_default' \
'*--resource=[Resources provided by the worker]:RESOURCE:_default' \
'--group=[Manual configuration of worker'\''s group Workers from the same group are used for multi-node tasks]:GROUP:_default' \
'--idle-timeout=[Duration after which will an idle worker automatically stop.  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:IDLE_TIMEOUT:_default' \
'--overview-interval=[How often should the worker send its overview status (e.g. HW usage, task status) to the server for monitoring. Set to "0s" to disable overview updates]:OVERVIEW_INTERVAL:_default' \
'--on-server-lost=[Behavior when a connection to a server is lost]:ON_SERVER_LOST:(stop finish-running)' \
'--worker-start-cmd=[Shell command that will be executed on each allocated node, before a worker is created on that node]:WORKER_START_CMD:_default' \
'--worker-stop-cmd=[Shell command that will be executed on each allocated node, just before the allocation ends. Note that this execution is best-effort. It is not guaranteed that the script will always be executed]:WORKER_STOP_CMD:_default' \
'--worker-time-limit=[ Time limit after which workers in the submitted allocations will be stopped. By default, it is set to the time limit of the allocation. However, if you want the workers to be stopped sooner, for example to give \`worker_stop_cmd\` more time to execute before the allocation is killed, you can lower the worker time limit.  The limit must not be larger than the allocation time limit.  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:WORKER_TIME_LIMIT:_default' \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--no-detect-resources[Disable auto-detection of resources]' \
'--no-hyper-threading[Ignore hyper-threading while detecting CPU cores]' \
'--no-dry-run[Disables dry-run, which submits an allocation with the specified parameters to verify whether the parameters are correct]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::additional_args -- Additional arguments passed to the submit command:_default' \
&& ret=0
;;
(slurm)
_arguments "${_arguments_options[@]}" : \
'-b+[How many jobs should be waiting in the queue to be started]:BACKLOG:_default' \
'--backlog=[How many jobs should be waiting in the queue to be started]:BACKLOG:_default' \
'-t+[Time limit (walltime) of PBS/Slurm allocations.  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:TIME_LIMIT:_default' \
'--time-limit=[Time limit (walltime) of PBS/Slurm allocations.  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:TIME_LIMIT:_default' \
'-w+[How many workers (nodes) should be spawned in each allocation]:WORKERS_PER_ALLOC:_default' \
'--workers-per-alloc=[How many workers (nodes) should be spawned in each allocation]:WORKERS_PER_ALLOC:_default' \
'--max-worker-count=[Maximum number of workers that can be queued or running at any given time in this queue]:MAX_WORKER_COUNT:_default' \
'-n+[Name of the allocation queue (for debug purposes only)]:NAME:_default' \
'--name=[Name of the allocation queue (for debug purposes only)]:NAME:_default' \
'--cpus=[How many cores should be allocated for the worker]:CPUS:_default' \
'*--resource=[Resources provided by the worker]:RESOURCE:_default' \
'--group=[Manual configuration of worker'\''s group Workers from the same group are used for multi-node tasks]:GROUP:_default' \
'--idle-timeout=[Duration after which will an idle worker automatically stop.  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:IDLE_TIMEOUT:_default' \
'--overview-interval=[How often should the worker send its overview status (e.g. HW usage, task status) to the server for monitoring. Set to "0s" to disable overview updates]:OVERVIEW_INTERVAL:_default' \
'--on-server-lost=[Behavior when a connection to a server is lost]:ON_SERVER_LOST:(stop finish-running)' \
'--worker-start-cmd=[Shell command that will be executed on each allocated node, before a worker is created on that node]:WORKER_START_CMD:_default' \
'--worker-stop-cmd=[Shell command that will be executed on each allocated node, just before the allocation ends. Note that this execution is best-effort. It is not guaranteed that the script will always be executed]:WORKER_STOP_CMD:_default' \
'--worker-time-limit=[ Time limit after which workers in the submitted allocations will be stopped. By default, it is set to the time limit of the allocation. However, if you want the workers to be stopped sooner, for example to give \`worker_stop_cmd\` more time to execute before the allocation is killed, you can lower the worker time limit.  The limit must not be larger than the allocation time limit.  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:WORKER_TIME_LIMIT:_default' \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--no-detect-resources[Disable auto-detection of resources]' \
'--no-hyper-threading[Ignore hyper-threading while detecting CPU cores]' \
'--no-dry-run[Disables dry-run, which submits an allocation with the specified parameters to verify whether the parameters are correct]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::additional_args -- Additional arguments passed to the submit command:_default' \
&& ret=0
;;
        esac
    ;;
esac
;;
(pause)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':queue_id -- ID of the allocation queue that should be paused:_default' \
&& ret=0
;;
(resume)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':queue_id -- ID of the allocation queue that should be resumed:_default' \
&& ret=0
;;
(dry-run)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_hq__alloc__dry-run_commands" \
"*::: :->dry-run" \
&& ret=0

    case $state in
    (dry-run)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:hq-alloc-dry-run-command-$line[1]:"
        case $line[1] in
            (pbs)
_arguments "${_arguments_options[@]}" : \
'-b+[How many jobs should be waiting in the queue to be started]:BACKLOG:_default' \
'--backlog=[How many jobs should be waiting in the queue to be started]:BACKLOG:_default' \
'-t+[Time limit (walltime) of PBS/Slurm allocations.  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:TIME_LIMIT:_default' \
'--time-limit=[Time limit (walltime) of PBS/Slurm allocations.  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:TIME_LIMIT:_default' \
'-w+[How many workers (nodes) should be spawned in each allocation]:WORKERS_PER_ALLOC:_default' \
'--workers-per-alloc=[How many workers (nodes) should be spawned in each allocation]:WORKERS_PER_ALLOC:_default' \
'--max-worker-count=[Maximum number of workers that can be queued or running at any given time in this queue]:MAX_WORKER_COUNT:_default' \
'-n+[Name of the allocation queue (for debug purposes only)]:NAME:_default' \
'--name=[Name of the allocation queue (for debug purposes only)]:NAME:_default' \
'--cpus=[How many cores should be allocated for the worker]:CPUS:_default' \
'*--resource=[Resources provided by the worker]:RESOURCE:_default' \
'--group=[Manual configuration of worker'\''s group Workers from the same group are used for multi-node tasks]:GROUP:_default' \
'--idle-timeout=[Duration after which will an idle worker automatically stop.  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:IDLE_TIMEOUT:_default' \
'--overview-interval=[How often should the worker send its overview status (e.g. HW usage, task status) to the server for monitoring. Set to "0s" to disable overview updates]:OVERVIEW_INTERVAL:_default' \
'--on-server-lost=[Behavior when a connection to a server is lost]:ON_SERVER_LOST:(stop finish-running)' \
'--worker-start-cmd=[Shell command that will be executed on each allocated node, before a worker is created on that node]:WORKER_START_CMD:_default' \
'--worker-stop-cmd=[Shell command that will be executed on each allocated node, just before the allocation ends. Note that this execution is best-effort. It is not guaranteed that the script will always be executed]:WORKER_STOP_CMD:_default' \
'--worker-time-limit=[ Time limit after which workers in the submitted allocations will be stopped. By default, it is set to the time limit of the allocation. However, if you want the workers to be stopped sooner, for example to give \`worker_stop_cmd\` more time to execute before the allocation is killed, you can lower the worker time limit.  The limit must not be larger than the allocation time limit.  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:WORKER_TIME_LIMIT:_default' \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--no-detect-resources[Disable auto-detection of resources]' \
'--no-hyper-threading[Ignore hyper-threading while detecting CPU cores]' \
'--no-dry-run[Disables dry-run, which submits an allocation with the specified parameters to verify whether the parameters are correct]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::additional_args -- Additional arguments passed to the submit command:_default' \
&& ret=0
;;
(slurm)
_arguments "${_arguments_options[@]}" : \
'-b+[How many jobs should be waiting in the queue to be started]:BACKLOG:_default' \
'--backlog=[How many jobs should be waiting in the queue to be started]:BACKLOG:_default' \
'-t+[Time limit (walltime) of PBS/Slurm allocations.  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:TIME_LIMIT:_default' \
'--time-limit=[Time limit (walltime) of PBS/Slurm allocations.  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:TIME_LIMIT:_default' \
'-w+[How many workers (nodes) should be spawned in each allocation]:WORKERS_PER_ALLOC:_default' \
'--workers-per-alloc=[How many workers (nodes) should be spawned in each allocation]:WORKERS_PER_ALLOC:_default' \
'--max-worker-count=[Maximum number of workers that can be queued or running at any given time in this queue]:MAX_WORKER_COUNT:_default' \
'-n+[Name of the allocation queue (for debug purposes only)]:NAME:_default' \
'--name=[Name of the allocation queue (for debug purposes only)]:NAME:_default' \
'--cpus=[How many cores should be allocated for the worker]:CPUS:_default' \
'*--resource=[Resources provided by the worker]:RESOURCE:_default' \
'--group=[Manual configuration of worker'\''s group Workers from the same group are used for multi-node tasks]:GROUP:_default' \
'--idle-timeout=[Duration after which will an idle worker automatically stop.  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:IDLE_TIMEOUT:_default' \
'--overview-interval=[How often should the worker send its overview status (e.g. HW usage, task status) to the server for monitoring. Set to "0s" to disable overview updates]:OVERVIEW_INTERVAL:_default' \
'--on-server-lost=[Behavior when a connection to a server is lost]:ON_SERVER_LOST:(stop finish-running)' \
'--worker-start-cmd=[Shell command that will be executed on each allocated node, before a worker is created on that node]:WORKER_START_CMD:_default' \
'--worker-stop-cmd=[Shell command that will be executed on each allocated node, just before the allocation ends. Note that this execution is best-effort. It is not guaranteed that the script will always be executed]:WORKER_STOP_CMD:_default' \
'--worker-time-limit=[ Time limit after which workers in the submitted allocations will be stopped. By default, it is set to the time limit of the allocation. However, if you want the workers to be stopped sooner, for example to give \`worker_stop_cmd\` more time to execute before the allocation is killed, you can lower the worker time limit.  The limit must not be larger than the allocation time limit.  You can use either the \`HH\:MM\:SS\` format or a "humantime" format. For example\: - 01\:00\:00 => 1 hour - 02\:05\:10 => 2 hours, 5 minutes, 10 seconds - 1h => 1 hour - 2h5m10s => 2 hours, 5 minutes, 10 seconds - 3h 10m 5s => 3 hours, 10 minutes, 5 seconds - 2 hours 5 minutes => 2 hours, 5 minutes]:WORKER_TIME_LIMIT:_default' \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--no-detect-resources[Disable auto-detection of resources]' \
'--no-hyper-threading[Ignore hyper-threading while detecting CPU cores]' \
'--no-dry-run[Disables dry-run, which submits an allocation with the specified parameters to verify whether the parameters are correct]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::additional_args -- Additional arguments passed to the submit command:_default' \
&& ret=0
;;
        esac
    ;;
esac
;;
(remove)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--force[Remove the queue even if there are currently running jobs. The running jobs will be canceled]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':queue_id -- ID of the allocation queue that should be removed:_default' \
&& ret=0
;;
        esac
    ;;
esac
;;
(journal)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_hq__journal_commands" \
"*::: :->journal" \
&& ret=0

    case $state in
    (journal)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:hq-journal-command-$line[1]:"
        case $line[1] in
            (export)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':journal -- Path to a journal. It had to be created with `hq server start --journal=<PATH>`:_files' \
&& ret=0
;;
(stream)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(replay)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(prune)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(flush)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
        esac
    ;;
esac
;;
(dashboard)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_hq__dashboard_commands" \
"*::: :->dashboard" \
&& ret=0

    case $state in
    (dashboard)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:hq-dashboard-command-$line[1]:"
        case $line[1] in
            (stream)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(replay)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':journal -- Path to a journal file created via `hq server start --journal=<path>`:_files' \
&& ret=0
;;
        esac
    ;;
esac
;;
(doc)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--open[Open the documentation in the default browser]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_hq__doc_commands" \
"*::: :->doc" \
&& ret=0

    case $state in
    (doc)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:hq-doc-command-$line[1]:"
        case $line[1] in
            (job)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--open[Open the documentation in the default browser]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(jobs)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--open[Open the documentation in the default browser]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(tasks)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--open[Open the documentation in the default browser]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(taskarray)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--open[Open the documentation in the default browser]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(resources)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--open[Open the documentation in the default browser]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(worker)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--open[Open the documentation in the default browser]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(workers)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--open[Open the documentation in the default browser]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(autoalloc)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--open[Open the documentation in the default browser]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(pbs)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--open[Open the documentation in the default browser]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(slurm)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--open[Open the documentation in the default browser]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(python-api)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--open[Open the documentation in the default browser]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(python)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--open[Open the documentation in the default browser]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(cheatsheet)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--open[Open the documentation in the default browser]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(changelog)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--open[Open the documentation in the default browser]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(faq)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--open[Open the documentation in the default browser]' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
        esac
    ;;
esac
;;
(generate-completion)
_arguments "${_arguments_options[@]}" : \
'--server-dir=[Path to a directory that stores HyperQueue access files]:SERVER_DIR:_files -/' \
'--colors=[Console color policy]:COLORS:((auto\:"Use colors if the stdout is detected to be a terminal"
always\:"Always use colors"
never\:"Never use colors"))' \
'--output-mode=[How should the output of the command be formatted]:OUTPUT_MODE:(cli json quiet)' \
'--debug[Turn on a more detailed log output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':shell -- Shell flavour for which the completion script should be generated:(bash elvish fish powershell zsh)' \
&& ret=0
;;
        esac
    ;;
esac
}

(( $+functions[_hq_commands] )) ||
_hq_commands() {
    local commands; commands=(
'server:Commands for controlling the HyperQueue server' \
'job:Commands for controlling HyperQueue jobs' \
'task:Commands for displaying task(s)' \
'submit:Submit a job to HyperQueue' \
'worker:Commands for controlling HyperQueue workers' \
'output-log:Operations with log' \
'alloc:Automatic allocation management' \
'journal:Event and journal management' \
'dashboard:Start the HyperQueue CLI dashboard' \
'doc:Display a link to or open HyperQueue documentation' \
'generate-completion:Generate shell completion script' \
    )
    _describe -t commands 'hq commands' commands "$@"
}
(( $+functions[_hq__alloc_commands] )) ||
_hq__alloc_commands() {
    local commands; commands=(
'list:Displays allocation queues' \
'info:Display allocations of the specified allocation queue' \
'add:Add new allocation queue' \
'pause:Pause an existing allocation queue. Paused queues do not submit new allocations' \
'resume:Resume a previously paused allocation queue' \
'dry-run:Try to submit an allocation to test allocation parameters' \
'remove:Removes an allocation queue with the given ID' \
    )
    _describe -t commands 'hq alloc commands' commands "$@"
}
(( $+functions[_hq__alloc__add_commands] )) ||
_hq__alloc__add_commands() {
    local commands; commands=(
'pbs:Create a PBS allocation queue' \
'slurm:Create a SLURM allocation queue' \
    )
    _describe -t commands 'hq alloc add commands' commands "$@"
}
(( $+functions[_hq__alloc__add__pbs_commands] )) ||
_hq__alloc__add__pbs_commands() {
    local commands; commands=()
    _describe -t commands 'hq alloc add pbs commands' commands "$@"
}
(( $+functions[_hq__alloc__add__slurm_commands] )) ||
_hq__alloc__add__slurm_commands() {
    local commands; commands=()
    _describe -t commands 'hq alloc add slurm commands' commands "$@"
}
(( $+functions[_hq__alloc__dry-run_commands] )) ||
_hq__alloc__dry-run_commands() {
    local commands; commands=(
'pbs:Try to create a PBS allocation' \
'slurm:Try to create a SLURM allocation' \
    )
    _describe -t commands 'hq alloc dry-run commands' commands "$@"
}
(( $+functions[_hq__alloc__dry-run__pbs_commands] )) ||
_hq__alloc__dry-run__pbs_commands() {
    local commands; commands=()
    _describe -t commands 'hq alloc dry-run pbs commands' commands "$@"
}
(( $+functions[_hq__alloc__dry-run__slurm_commands] )) ||
_hq__alloc__dry-run__slurm_commands() {
    local commands; commands=()
    _describe -t commands 'hq alloc dry-run slurm commands' commands "$@"
}
(( $+functions[_hq__alloc__info_commands] )) ||
_hq__alloc__info_commands() {
    local commands; commands=()
    _describe -t commands 'hq alloc info commands' commands "$@"
}
(( $+functions[_hq__alloc__list_commands] )) ||
_hq__alloc__list_commands() {
    local commands; commands=()
    _describe -t commands 'hq alloc list commands' commands "$@"
}
(( $+functions[_hq__alloc__pause_commands] )) ||
_hq__alloc__pause_commands() {
    local commands; commands=()
    _describe -t commands 'hq alloc pause commands' commands "$@"
}
(( $+functions[_hq__alloc__remove_commands] )) ||
_hq__alloc__remove_commands() {
    local commands; commands=()
    _describe -t commands 'hq alloc remove commands' commands "$@"
}
(( $+functions[_hq__alloc__resume_commands] )) ||
_hq__alloc__resume_commands() {
    local commands; commands=()
    _describe -t commands 'hq alloc resume commands' commands "$@"
}
(( $+functions[_hq__dashboard_commands] )) ||
_hq__dashboard_commands() {
    local commands; commands=(
'stream:Stream events from a server. Note that this will replay all events from the currently active journal file before new events will be streamed' \
'replay:Replay events from a recorded journal file' \
    )
    _describe -t commands 'hq dashboard commands' commands "$@"
}
(( $+functions[_hq__dashboard__replay_commands] )) ||
_hq__dashboard__replay_commands() {
    local commands; commands=()
    _describe -t commands 'hq dashboard replay commands' commands "$@"
}
(( $+functions[_hq__dashboard__stream_commands] )) ||
_hq__dashboard__stream_commands() {
    local commands; commands=()
    _describe -t commands 'hq dashboard stream commands' commands "$@"
}
(( $+functions[_hq__doc_commands] )) ||
_hq__doc_commands() {
    local commands; commands=(
'job:Submitting and examining tasks and jobs' \
'jobs:Submitting and examining tasks and jobs' \
'tasks:Submitting and examining tasks and jobs' \
'taskarray:Jobs containing large amounts of similar tasks' \
'resources:CPU and generic resources of tasks' \
'worker:Deployment of workers' \
'workers:Deployment of workers' \
'autoalloc:Automatic allocator subsystem' \
'pbs:Automatic allocator subsystem' \
'slurm:Automatic allocator subsystem' \
'python-api:Python API' \
'python:Python API' \
'cheatsheet:Cheatsheet with the most common HyperQueue commands' \
'changelog:Changelog' \
'faq:Frequently asked questions about HyperQueue' \
    )
    _describe -t commands 'hq doc commands' commands "$@"
}
(( $+functions[_hq__doc__autoalloc_commands] )) ||
_hq__doc__autoalloc_commands() {
    local commands; commands=()
    _describe -t commands 'hq doc autoalloc commands' commands "$@"
}
(( $+functions[_hq__doc__changelog_commands] )) ||
_hq__doc__changelog_commands() {
    local commands; commands=()
    _describe -t commands 'hq doc changelog commands' commands "$@"
}
(( $+functions[_hq__doc__cheatsheet_commands] )) ||
_hq__doc__cheatsheet_commands() {
    local commands; commands=()
    _describe -t commands 'hq doc cheatsheet commands' commands "$@"
}
(( $+functions[_hq__doc__faq_commands] )) ||
_hq__doc__faq_commands() {
    local commands; commands=()
    _describe -t commands 'hq doc faq commands' commands "$@"
}
(( $+functions[_hq__doc__job_commands] )) ||
_hq__doc__job_commands() {
    local commands; commands=()
    _describe -t commands 'hq doc job commands' commands "$@"
}
(( $+functions[_hq__doc__python-api_commands] )) ||
_hq__doc__python-api_commands() {
    local commands; commands=()
    _describe -t commands 'hq doc python-api commands' commands "$@"
}
(( $+functions[_hq__doc__resources_commands] )) ||
_hq__doc__resources_commands() {
    local commands; commands=()
    _describe -t commands 'hq doc resources commands' commands "$@"
}
(( $+functions[_hq__doc__taskarray_commands] )) ||
_hq__doc__taskarray_commands() {
    local commands; commands=()
    _describe -t commands 'hq doc taskarray commands' commands "$@"
}
(( $+functions[_hq__doc__worker_commands] )) ||
_hq__doc__worker_commands() {
    local commands; commands=()
    _describe -t commands 'hq doc worker commands' commands "$@"
}
(( $+functions[_hq__generate-completion_commands] )) ||
_hq__generate-completion_commands() {
    local commands; commands=()
    _describe -t commands 'hq generate-completion commands' commands "$@"
}
(( $+functions[_hq__job_commands] )) ||
_hq__job_commands() {
    local commands; commands=(
'list:Display information about jobs. By default, only queued or running jobs will be displayed' \
'summary:Display a summary with the amount of jobs per each job state' \
'info:Display detailed information of the selected job' \
'cancel:Cancel a specific job. This will cancel all tasks, stopping them from being computation' \
'forget:Forget a specific job. This will remove the job from the server'\''s memory, forgetting it completely and reducing the server'\''s memory usage' \
'cat:Shows task(s) streams(stdout, stderr) of a specific job' \
'submit:Submit a job to HyperQueue' \
'submit-file:Submit a job through a job definition file' \
'wait:Waits until a job is finished' \
'progress:Interactively observe the execution of a job' \
'task-ids:Print task Ids for given job' \
'open:Open new job (without attaching any tasks yet)' \
'close:Close an open job' \
    )
    _describe -t commands 'hq job commands' commands "$@"
}
(( $+functions[_hq__job__cancel_commands] )) ||
_hq__job__cancel_commands() {
    local commands; commands=()
    _describe -t commands 'hq job cancel commands' commands "$@"
}
(( $+functions[_hq__job__cat_commands] )) ||
_hq__job__cat_commands() {
    local commands; commands=()
    _describe -t commands 'hq job cat commands' commands "$@"
}
(( $+functions[_hq__job__close_commands] )) ||
_hq__job__close_commands() {
    local commands; commands=()
    _describe -t commands 'hq job close commands' commands "$@"
}
(( $+functions[_hq__job__forget_commands] )) ||
_hq__job__forget_commands() {
    local commands; commands=()
    _describe -t commands 'hq job forget commands' commands "$@"
}
(( $+functions[_hq__job__info_commands] )) ||
_hq__job__info_commands() {
    local commands; commands=()
    _describe -t commands 'hq job info commands' commands "$@"
}
(( $+functions[_hq__job__list_commands] )) ||
_hq__job__list_commands() {
    local commands; commands=()
    _describe -t commands 'hq job list commands' commands "$@"
}
(( $+functions[_hq__job__open_commands] )) ||
_hq__job__open_commands() {
    local commands; commands=()
    _describe -t commands 'hq job open commands' commands "$@"
}
(( $+functions[_hq__job__progress_commands] )) ||
_hq__job__progress_commands() {
    local commands; commands=()
    _describe -t commands 'hq job progress commands' commands "$@"
}
(( $+functions[_hq__job__submit_commands] )) ||
_hq__job__submit_commands() {
    local commands; commands=()
    _describe -t commands 'hq job submit commands' commands "$@"
}
(( $+functions[_hq__job__submit-file_commands] )) ||
_hq__job__submit-file_commands() {
    local commands; commands=()
    _describe -t commands 'hq job submit-file commands' commands "$@"
}
(( $+functions[_hq__job__summary_commands] )) ||
_hq__job__summary_commands() {
    local commands; commands=()
    _describe -t commands 'hq job summary commands' commands "$@"
}
(( $+functions[_hq__job__task-ids_commands] )) ||
_hq__job__task-ids_commands() {
    local commands; commands=()
    _describe -t commands 'hq job task-ids commands' commands "$@"
}
(( $+functions[_hq__job__wait_commands] )) ||
_hq__job__wait_commands() {
    local commands; commands=()
    _describe -t commands 'hq job wait commands' commands "$@"
}
(( $+functions[_hq__journal_commands] )) ||
_hq__journal_commands() {
    local commands; commands=(
'export:Export events from a journal to NDJSON (line-delimited JSON). Events will be exported to \`stdout\`, you can redirect it e.g. to a file' \
'stream:Stream events from a running server, it first replays old events then it waits for new live events' \
'replay:Stream events from a running server, it replays old events after that it terminates the connection' \
'prune:Connect to a server and remove completed tasks and non-active workers from journal' \
'flush:Connect to a server and forces to flush a journal' \
    )
    _describe -t commands 'hq journal commands' commands "$@"
}
(( $+functions[_hq__journal__export_commands] )) ||
_hq__journal__export_commands() {
    local commands; commands=()
    _describe -t commands 'hq journal export commands' commands "$@"
}
(( $+functions[_hq__journal__flush_commands] )) ||
_hq__journal__flush_commands() {
    local commands; commands=()
    _describe -t commands 'hq journal flush commands' commands "$@"
}
(( $+functions[_hq__journal__prune_commands] )) ||
_hq__journal__prune_commands() {
    local commands; commands=()
    _describe -t commands 'hq journal prune commands' commands "$@"
}
(( $+functions[_hq__journal__replay_commands] )) ||
_hq__journal__replay_commands() {
    local commands; commands=()
    _describe -t commands 'hq journal replay commands' commands "$@"
}
(( $+functions[_hq__journal__stream_commands] )) ||
_hq__journal__stream_commands() {
    local commands; commands=()
    _describe -t commands 'hq journal stream commands' commands "$@"
}
(( $+functions[_hq__output-log_commands] )) ||
_hq__output-log_commands() {
    local commands; commands=(
'summary:Prints summary of log file' \
'jobs:Prints jobs ids in stream' \
'show:Prints content of stream ordered by time' \
'cat:Prints a raw content of one channel' \
'export:Export stream into JSON' \
    )
    _describe -t commands 'hq output-log commands' commands "$@"
}
(( $+functions[_hq__output-log__cat_commands] )) ||
_hq__output-log__cat_commands() {
    local commands; commands=()
    _describe -t commands 'hq output-log cat commands' commands "$@"
}
(( $+functions[_hq__output-log__export_commands] )) ||
_hq__output-log__export_commands() {
    local commands; commands=()
    _describe -t commands 'hq output-log export commands' commands "$@"
}
(( $+functions[_hq__output-log__jobs_commands] )) ||
_hq__output-log__jobs_commands() {
    local commands; commands=()
    _describe -t commands 'hq output-log jobs commands' commands "$@"
}
(( $+functions[_hq__output-log__show_commands] )) ||
_hq__output-log__show_commands() {
    local commands; commands=()
    _describe -t commands 'hq output-log show commands' commands "$@"
}
(( $+functions[_hq__output-log__summary_commands] )) ||
_hq__output-log__summary_commands() {
    local commands; commands=()
    _describe -t commands 'hq output-log summary commands' commands "$@"
}
(( $+functions[_hq__server_commands] )) ||
_hq__server_commands() {
    local commands; commands=(
'start:Start the HyperQueue server' \
'stop:Stop the HyperQueue server, if it is running' \
'info:Show info of running HyperQueue server' \
'generate-access:Generate access file without starting server' \
    )
    _describe -t commands 'hq server commands' commands "$@"
}
(( $+functions[_hq__server__generate-access_commands] )) ||
_hq__server__generate-access_commands() {
    local commands; commands=()
    _describe -t commands 'hq server generate-access commands' commands "$@"
}
(( $+functions[_hq__server__info_commands] )) ||
_hq__server__info_commands() {
    local commands; commands=()
    _describe -t commands 'hq server info commands' commands "$@"
}
(( $+functions[_hq__server__start_commands] )) ||
_hq__server__start_commands() {
    local commands; commands=()
    _describe -t commands 'hq server start commands' commands "$@"
}
(( $+functions[_hq__server__stop_commands] )) ||
_hq__server__stop_commands() {
    local commands; commands=()
    _describe -t commands 'hq server stop commands' commands "$@"
}
(( $+functions[_hq__submit_commands] )) ||
_hq__submit_commands() {
    local commands; commands=()
    _describe -t commands 'hq submit commands' commands "$@"
}
(( $+functions[_hq__task_commands] )) ||
_hq__task_commands() {
    local commands; commands=(
'list:Displays task(s) associated with selected job(s)' \
'info:Displays detailed task info' \
    )
    _describe -t commands 'hq task commands' commands "$@"
}
(( $+functions[_hq__task__info_commands] )) ||
_hq__task__info_commands() {
    local commands; commands=()
    _describe -t commands 'hq task info commands' commands "$@"
}
(( $+functions[_hq__task__list_commands] )) ||
_hq__task__list_commands() {
    local commands; commands=()
    _describe -t commands 'hq task list commands' commands "$@"
}
(( $+functions[_hq__worker_commands] )) ||
_hq__worker_commands() {
    local commands; commands=(
'start:Start worker' \
'stop:Stop worker' \
'list:Display information about workers. By default, only running workers will be displayed' \
'hwdetect:Hwdetect' \
'info:Display information about a specific worker' \
'address:Display worker'\''s hostname' \
'wait:Waits on the connection of worker(s)' \
'deploy-ssh:Deploy a set of workers using SSH' \
    )
    _describe -t commands 'hq worker commands' commands "$@"
}
(( $+functions[_hq__worker__address_commands] )) ||
_hq__worker__address_commands() {
    local commands; commands=()
    _describe -t commands 'hq worker address commands' commands "$@"
}
(( $+functions[_hq__worker__deploy-ssh_commands] )) ||
_hq__worker__deploy-ssh_commands() {
    local commands; commands=()
    _describe -t commands 'hq worker deploy-ssh commands' commands "$@"
}
(( $+functions[_hq__worker__hwdetect_commands] )) ||
_hq__worker__hwdetect_commands() {
    local commands; commands=()
    _describe -t commands 'hq worker hwdetect commands' commands "$@"
}
(( $+functions[_hq__worker__info_commands] )) ||
_hq__worker__info_commands() {
    local commands; commands=()
    _describe -t commands 'hq worker info commands' commands "$@"
}
(( $+functions[_hq__worker__list_commands] )) ||
_hq__worker__list_commands() {
    local commands; commands=()
    _describe -t commands 'hq worker list commands' commands "$@"
}
(( $+functions[_hq__worker__start_commands] )) ||
_hq__worker__start_commands() {
    local commands; commands=()
    _describe -t commands 'hq worker start commands' commands "$@"
}
(( $+functions[_hq__worker__stop_commands] )) ||
_hq__worker__stop_commands() {
    local commands; commands=()
    _describe -t commands 'hq worker stop commands' commands "$@"
}
(( $+functions[_hq__worker__wait_commands] )) ||
_hq__worker__wait_commands() {
    local commands; commands=()
    _describe -t commands 'hq worker wait commands' commands "$@"
}

if [ "$funcstack[1]" = "_hq" ]; then
    _hq "$@"
else
    compdef _hq hq
fi
