#compdef below

autoload -U is-at-least

_below() {
    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[@]}" \
'--config=[]:CONFIG: ' \
'-h[Print help information]' \
'--help[Print help information]' \
'-d[]' \
'--debug[]' \
":: :_below_commands" \
"*::: :->below" \
&& ret=0
    case $state in
    (below)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:below-command-$line[1]:"
        case $line[1] in
            (live)
_arguments "${_arguments_options[@]}" \
'-i+[]:INTERVAL_S: ' \
'--interval-s=[]:INTERVAL_S: ' \
'-s+[Supply hostname to activate remote viewing]:HOST: ' \
'--host=[Supply hostname to activate remote viewing]:HOST: ' \
'--port=[Override default port to connect remote viewing to]:PORT: ' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(record)
_arguments "${_arguments_options[@]}" \
'-i+[]:INTERVAL_S: ' \
'--interval-s=[]:INTERVAL_S: ' \
'--retain-for-s=[Store retention in seconds. Data is stored in 24 hour shards. Whever an entire shard of data is outside the retention period it is discarded. That is, any data older than retention + 24 hours is guaranteed to be discarded]:RETAIN_FOR_S: ' \
'--store-size-limit=[Store size limit in bytes. Data is stored in 24 hour shards. Shards before the active shard are deleted, oldest first, according to the size limit. Enforcement is only triggered on new shard creation]:STORE_SIZE_LIMIT: ' \
'--port=[Override default port for remote viewing server]:PORT: ' \
'--skew-detection-threshold-ms=[Threshold for hold long data collection takes to trigger warnings]:SKEW_DETECTION_THRESHOLD_MS: ' \
'--dict-compress-chunk-size=[Only valid when used with --compress. Must be at least 2, a power of 2, and at most 32768]:DICT_COMPRESS_CHUNK_SIZE: ' \
'--collect-io-stat[Whether or not to collect io.stat for cgroups which could be expensive]' \
'--disable-disk-stat[Flag to disable disk_stat collection]' \
'--disable-exitstats[Flag to disable eBPF-based exitstats]' \
'--compress[Enable zstd data file compression]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(replay)
_arguments "${_arguments_options[@]}" \
'-t+[Time string specifying the replay starting point, e.g. "1 day ago"{n}
Keywords: now, today, yesterday{n}
Relative: {humantime} ago, e.g. "2 days 3 hr 15m 10sec ago"{n}
Relative short: Mixed {time_digit}{time_unit_char} E.g. 10m, 3d2h, 5h30s. Case insensitive.{n}
Absolute: "Jan 01 23:59", "01/01/1970 11:59PM", "1970-01-01 23:59:59"{n}
Unix Epoch: 1589808367
_]:TIME: ' \
'--time=[Time string specifying the replay starting point, e.g. "1 day ago"{n}
Keywords: now, today, yesterday{n}
Relative: {humantime} ago, e.g. "2 days 3 hr 15m 10sec ago"{n}
Relative short: Mixed {time_digit}{time_unit_char} E.g. 10m, 3d2h, 5h30s. Case insensitive.{n}
Absolute: "Jan 01 23:59", "01/01/1970 11:59PM", "1970-01-01 23:59:59"{n}
Unix Epoch: 1589808367
_]:TIME: ' \
'-s+[Supply hostname to activate remote viewing]:HOST: ' \
'--host=[Supply hostname to activate remote viewing]:HOST: ' \
'--port=[Override default port to connect remote viewing to]:PORT: ' \
'-r+[Days adjuster: y\[y...\] for yesterday (repeated).
Each "y" will deduct 1 day from the input of "--time/-t"{n}
Examples:
* Yesterday at 2 pm: below replay -r y -t 2:00pm
* 09/01/2020 17:00: below replay -r yy -t "09/03/2020 17:00"]:YESTERDAYS: ' \
'(-s --host)--snapshot=[Replay from a snapshot file generated by the snapshot command instead of from the store directory]:SNAPSHOT: ' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(debug)
_arguments "${_arguments_options[@]}" \
'-h[Print help information]' \
'--help[Print help information]' \
":: :_below__debug_commands" \
"*::: :->debug" \
&& ret=0

    case $state in
    (debug)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:below-debug-command-$line[1]:"
        case $line[1] in
            (dump-store)
_arguments "${_arguments_options[@]}" \
'-t+[Time string to dump data for (same format as Replay mode)]:TIME: ' \
'--time=[Time string to dump data for (same format as Replay mode)]:TIME: ' \
'-j[Pretty print in JSON]' \
'--json[Pretty print in JSON]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(convert-store)
_arguments "${_arguments_options[@]}" \
'-b+[]:BEGIN: ' \
'--begin=[]:BEGIN: ' \
'-e+[]:END: ' \
'--end=[]:END: ' \
'--duration=[]:DURATION: ' \
'--from-store-dir=[]:FROM_STORE_DIR: ' \
'--to-store-dir=[]:TO_STORE_DIR: ' \
'-s+[]:HOST: ' \
'--host=[]:HOST: ' \
'--port=[]:PORT: ' \
'--dict-compress-chunk-size=[Only valid when used with --compress. Must be at least 2, a power of 2, and at most 32768]:DICT_COMPRESS_CHUNK_SIZE: ' \
'--compress[Enable zstd data file compression]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
        esac
    ;;
esac
;;
(dump)
_arguments "${_arguments_options[@]}" \
'-s+[Supply hostname to activate remote dumping]:HOST: ' \
'--host=[Supply hostname to activate remote dumping]:HOST: ' \
'--port=[Override default port to connect remote dumping to]:PORT: ' \
'(-s --host)--snapshot=[Dump from a snapshot file generated by the snapshot command instead of from the store directory]:SNAPSHOT: ' \
'-h[Print help information]' \
'--help[Print help information]' \
":: :_below__dump_commands" \
"*::: :->dump" \
&& ret=0

    case $state in
    (dump)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:below-dump-command-$line[1]:"
        case $line[1] in
            (system)
_arguments "${_arguments_options[@]}" \
'*-f+[Select which fields to display and in what order]:FIELDS: ' \
'*--fields=[Select which fields to display and in what order]:FIELDS: ' \
'-b+[Begin time, same format as replay]:BEGIN: ' \
'--begin=[Begin time, same format as replay]:BEGIN: ' \
'-e+[End time, same format as replay]:END: ' \
'--end=[End time, same format as replay]:END: ' \
'--duration=[Time string specifying the duration, e.g. "10 min"{n} Keywords: days min, h, sec{n} Relative: {humantime}, e.g. "2 days 3 hr 15m 10sec"{n} _]:DURATION: ' \
'-F+[Take a regex and apply to --select selected field. See command level doc for example]:FILTER: ' \
'--filter=[Take a regex and apply to --select selected field. See command level doc for example]:FILTER: ' \
'--top=[]:TOP: ' \
'--repeat-title=[Repeat title, for each N line, it will render a line of title. Only for raw output format]:REPEAT_TITLE: ' \
'-O+[Output format. Choose from raw, csv, tsv, kv, json, openmetrics. Default to raw]:OUTPUT_FORMAT: ' \
'--output-format=[Output format. Choose from raw, csv, tsv, kv, json, openmetrics. Default to raw]:OUTPUT_FORMAT: ' \
'-o+[Output destination, default to stdout]:OUTPUT: ' \
'--output=[Output destination, default to stdout]:OUTPUT: ' \
'-r+[Days adjuster, same as -r option in replay]:YESTERDAYS: ' \
'--br=[Line break symbol between samples]:BR: ' \
'(-f --fields)-p+[Saved pattern in the dumprc file under \[system\] section]:PATTERN: ' \
'(-f --fields)--pattern=[Saved pattern in the dumprc file under \[system\] section]:PATTERN: ' \
'--default[Show all top layer fields. If --default is specified, it overrides any specified fields via --fields]' \
'--everything[Show all fields. If --everything is specified, --fields and --default are overridden]' \
'-d[Show more infomation other than default]' \
'--detail[Show more infomation other than default]' \
'--sort[Sort (lower to higher) by --select selected field. See command level doc for example]' \
'--rsort[Sort (higher to lower) by --select selected field. See command level doc for example]' \
'--disable-title[Disable title in raw, csv or tsv format output]' \
'--raw[Dump raw data without units or conversion]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(disk)
_arguments "${_arguments_options[@]}" \
'*-f+[Select which fields to display and in what order]:FIELDS: ' \
'*--fields=[Select which fields to display and in what order]:FIELDS: ' \
'-b+[Begin time, same format as replay]:BEGIN: ' \
'--begin=[Begin time, same format as replay]:BEGIN: ' \
'-e+[End time, same format as replay]:END: ' \
'--end=[End time, same format as replay]:END: ' \
'--duration=[Time string specifying the duration, e.g. "10 min"{n} Keywords: days min, h, sec{n} Relative: {humantime}, e.g. "2 days 3 hr 15m 10sec"{n} _]:DURATION: ' \
'-F+[Take a regex and apply to --select selected field. See command level doc for example]:FILTER: ' \
'--filter=[Take a regex and apply to --select selected field. See command level doc for example]:FILTER: ' \
'--top=[]:TOP: ' \
'--repeat-title=[Repeat title, for each N line, it will render a line of title. Only for raw output format]:REPEAT_TITLE: ' \
'-O+[Output format. Choose from raw, csv, tsv, kv, json, openmetrics. Default to raw]:OUTPUT_FORMAT: ' \
'--output-format=[Output format. Choose from raw, csv, tsv, kv, json, openmetrics. Default to raw]:OUTPUT_FORMAT: ' \
'-o+[Output destination, default to stdout]:OUTPUT: ' \
'--output=[Output destination, default to stdout]:OUTPUT: ' \
'-r+[Days adjuster, same as -r option in replay]:YESTERDAYS: ' \
'--br=[Line break symbol between samples]:BR: ' \
'-s+[Select field for operation, use with --sort, --rsort, --filter, --top]:SELECT: ' \
'--select=[Select field for operation, use with --sort, --rsort, --filter, --top]:SELECT: ' \
'(-f --fields)-p+[Saved pattern in the dumprc file under \[disk\] section]:PATTERN: ' \
'(-f --fields)--pattern=[Saved pattern in the dumprc file under \[disk\] section]:PATTERN: ' \
'--default[Show all top layer fields. If --default is specified, it overrides any specified fields via --fields]' \
'--everything[Show all fields. If --everything is specified, --fields and --default are overridden]' \
'-d[Show more infomation other than default]' \
'--detail[Show more infomation other than default]' \
'--sort[Sort (lower to higher) by --select selected field. See command level doc for example]' \
'--rsort[Sort (higher to lower) by --select selected field. See command level doc for example]' \
'--disable-title[Disable title in raw, csv or tsv format output]' \
'--raw[Dump raw data without units or conversion]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(btrfs)
_arguments "${_arguments_options[@]}" \
'*-f+[Select which fields to display and in what order]:FIELDS: ' \
'*--fields=[Select which fields to display and in what order]:FIELDS: ' \
'-b+[Begin time, same format as replay]:BEGIN: ' \
'--begin=[Begin time, same format as replay]:BEGIN: ' \
'-e+[End time, same format as replay]:END: ' \
'--end=[End time, same format as replay]:END: ' \
'--duration=[Time string specifying the duration, e.g. "10 min"{n} Keywords: days min, h, sec{n} Relative: {humantime}, e.g. "2 days 3 hr 15m 10sec"{n} _]:DURATION: ' \
'-F+[Take a regex and apply to --select selected field. See command level doc for example]:FILTER: ' \
'--filter=[Take a regex and apply to --select selected field. See command level doc for example]:FILTER: ' \
'--top=[]:TOP: ' \
'--repeat-title=[Repeat title, for each N line, it will render a line of title. Only for raw output format]:REPEAT_TITLE: ' \
'-O+[Output format. Choose from raw, csv, tsv, kv, json, openmetrics. Default to raw]:OUTPUT_FORMAT: ' \
'--output-format=[Output format. Choose from raw, csv, tsv, kv, json, openmetrics. Default to raw]:OUTPUT_FORMAT: ' \
'-o+[Output destination, default to stdout]:OUTPUT: ' \
'--output=[Output destination, default to stdout]:OUTPUT: ' \
'-r+[Days adjuster, same as -r option in replay]:YESTERDAYS: ' \
'--br=[Line break symbol between samples]:BR: ' \
'-s+[Select field for operation, use with --sort, --rsort, --filter, --top]:SELECT: ' \
'--select=[Select field for operation, use with --sort, --rsort, --filter, --top]:SELECT: ' \
'(-f --fields)-p+[Saved pattern in the dumprc file under \[btrfs\] section]:PATTERN: ' \
'(-f --fields)--pattern=[Saved pattern in the dumprc file under \[btrfs\] section]:PATTERN: ' \
'--default[Show all top layer fields. If --default is specified, it overrides any specified fields via --fields]' \
'--everything[Show all fields. If --everything is specified, --fields and --default are overridden]' \
'-d[Show more infomation other than default]' \
'--detail[Show more infomation other than default]' \
'--sort[Sort (lower to higher) by --select selected field. See command level doc for example]' \
'--rsort[Sort (higher to lower) by --select selected field. See command level doc for example]' \
'--disable-title[Disable title in raw, csv or tsv format output]' \
'--raw[Dump raw data without units or conversion]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(process)
_arguments "${_arguments_options[@]}" \
'*-f+[Select which fields to display and in what order]:FIELDS: ' \
'*--fields=[Select which fields to display and in what order]:FIELDS: ' \
'-b+[Begin time, same format as replay]:BEGIN: ' \
'--begin=[Begin time, same format as replay]:BEGIN: ' \
'-e+[End time, same format as replay]:END: ' \
'--end=[End time, same format as replay]:END: ' \
'--duration=[Time string specifying the duration, e.g. "10 min"{n} Keywords: days min, h, sec{n} Relative: {humantime}, e.g. "2 days 3 hr 15m 10sec"{n} _]:DURATION: ' \
'-F+[Take a regex and apply to --select selected field. See command level doc for example]:FILTER: ' \
'--filter=[Take a regex and apply to --select selected field. See command level doc for example]:FILTER: ' \
'--top=[]:TOP: ' \
'--repeat-title=[Repeat title, for each N line, it will render a line of title. Only for raw output format]:REPEAT_TITLE: ' \
'-O+[Output format. Choose from raw, csv, tsv, kv, json, openmetrics. Default to raw]:OUTPUT_FORMAT: ' \
'--output-format=[Output format. Choose from raw, csv, tsv, kv, json, openmetrics. Default to raw]:OUTPUT_FORMAT: ' \
'-o+[Output destination, default to stdout]:OUTPUT: ' \
'--output=[Output destination, default to stdout]:OUTPUT: ' \
'-r+[Days adjuster, same as -r option in replay]:YESTERDAYS: ' \
'--br=[Line break symbol between samples]:BR: ' \
'-s+[Select field for operation, use with --sort, --rsort, --filter, --top]:SELECT: ' \
'--select=[Select field for operation, use with --sort, --rsort, --filter, --top]:SELECT: ' \
'(-f --fields)-p+[Saved pattern in the dumprc file under \[process\] section]:PATTERN: ' \
'(-f --fields)--pattern=[Saved pattern in the dumprc file under \[process\] section]:PATTERN: ' \
'--default[Show all top layer fields. If --default is specified, it overrides any specified fields via --fields]' \
'--everything[Show all fields. If --everything is specified, --fields and --default are overridden]' \
'-d[Show more infomation other than default]' \
'--detail[Show more infomation other than default]' \
'--sort[Sort (lower to higher) by --select selected field. See command level doc for example]' \
'--rsort[Sort (higher to lower) by --select selected field. See command level doc for example]' \
'--disable-title[Disable title in raw, csv or tsv format output]' \
'--raw[Dump raw data without units or conversion]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(cgroup)
_arguments "${_arguments_options[@]}" \
'*-f+[Select which fields to display and in what order]:FIELDS: ' \
'*--fields=[Select which fields to display and in what order]:FIELDS: ' \
'-b+[Begin time, same format as replay]:BEGIN: ' \
'--begin=[Begin time, same format as replay]:BEGIN: ' \
'-e+[End time, same format as replay]:END: ' \
'--end=[End time, same format as replay]:END: ' \
'--duration=[Time string specifying the duration, e.g. "10 min"{n} Keywords: days min, h, sec{n} Relative: {humantime}, e.g. "2 days 3 hr 15m 10sec"{n} _]:DURATION: ' \
'-F+[Take a regex and apply to --select selected field. See command level doc for example]:FILTER: ' \
'--filter=[Take a regex and apply to --select selected field. See command level doc for example]:FILTER: ' \
'--top=[]:TOP: ' \
'--repeat-title=[Repeat title, for each N line, it will render a line of title. Only for raw output format]:REPEAT_TITLE: ' \
'-O+[Output format. Choose from raw, csv, tsv, kv, json, openmetrics. Default to raw]:OUTPUT_FORMAT: ' \
'--output-format=[Output format. Choose from raw, csv, tsv, kv, json, openmetrics. Default to raw]:OUTPUT_FORMAT: ' \
'-o+[Output destination, default to stdout]:OUTPUT: ' \
'--output=[Output destination, default to stdout]:OUTPUT: ' \
'-r+[Days adjuster, same as -r option in replay]:YESTERDAYS: ' \
'--br=[Line break symbol between samples]:BR: ' \
'-s+[Select field for operation, use with --sort, --rsort, --filter, --top]:SELECT: ' \
'--select=[Select field for operation, use with --sort, --rsort, --filter, --top]:SELECT: ' \
'(-f --fields)-p+[Saved pattern in the dumprc file under \[cgroup\] section]:PATTERN: ' \
'(-f --fields)--pattern=[Saved pattern in the dumprc file under \[cgroup\] section]:PATTERN: ' \
'--default[Show all top layer fields. If --default is specified, it overrides any specified fields via --fields]' \
'--everything[Show all fields. If --everything is specified, --fields and --default are overridden]' \
'-d[Show more infomation other than default]' \
'--detail[Show more infomation other than default]' \
'--sort[Sort (lower to higher) by --select selected field. See command level doc for example]' \
'--rsort[Sort (higher to lower) by --select selected field. See command level doc for example]' \
'--disable-title[Disable title in raw, csv or tsv format output]' \
'--raw[Dump raw data without units or conversion]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(iface)
_arguments "${_arguments_options[@]}" \
'*-f+[Select which fields to display and in what order]:FIELDS: ' \
'*--fields=[Select which fields to display and in what order]:FIELDS: ' \
'-b+[Begin time, same format as replay]:BEGIN: ' \
'--begin=[Begin time, same format as replay]:BEGIN: ' \
'-e+[End time, same format as replay]:END: ' \
'--end=[End time, same format as replay]:END: ' \
'--duration=[Time string specifying the duration, e.g. "10 min"{n} Keywords: days min, h, sec{n} Relative: {humantime}, e.g. "2 days 3 hr 15m 10sec"{n} _]:DURATION: ' \
'-F+[Take a regex and apply to --select selected field. See command level doc for example]:FILTER: ' \
'--filter=[Take a regex and apply to --select selected field. See command level doc for example]:FILTER: ' \
'--top=[]:TOP: ' \
'--repeat-title=[Repeat title, for each N line, it will render a line of title. Only for raw output format]:REPEAT_TITLE: ' \
'-O+[Output format. Choose from raw, csv, tsv, kv, json, openmetrics. Default to raw]:OUTPUT_FORMAT: ' \
'--output-format=[Output format. Choose from raw, csv, tsv, kv, json, openmetrics. Default to raw]:OUTPUT_FORMAT: ' \
'-o+[Output destination, default to stdout]:OUTPUT: ' \
'--output=[Output destination, default to stdout]:OUTPUT: ' \
'-r+[Days adjuster, same as -r option in replay]:YESTERDAYS: ' \
'--br=[Line break symbol between samples]:BR: ' \
'-s+[Select field for operation, use with --filter]:SELECT: ' \
'--select=[Select field for operation, use with --filter]:SELECT: ' \
'(-f --fields)-p+[Saved pattern in the dumprc file under \[iface\] section]:PATTERN: ' \
'(-f --fields)--pattern=[Saved pattern in the dumprc file under \[iface\] section]:PATTERN: ' \
'--default[Show all top layer fields. If --default is specified, it overrides any specified fields via --fields]' \
'--everything[Show all fields. If --everything is specified, --fields and --default are overridden]' \
'-d[Show more infomation other than default]' \
'--detail[Show more infomation other than default]' \
'--sort[Sort (lower to higher) by --select selected field. See command level doc for example]' \
'--rsort[Sort (higher to lower) by --select selected field. See command level doc for example]' \
'--disable-title[Disable title in raw, csv or tsv format output]' \
'--raw[Dump raw data without units or conversion]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(network)
_arguments "${_arguments_options[@]}" \
'*-f+[Select which fields to display and in what order]:FIELDS: ' \
'*--fields=[Select which fields to display and in what order]:FIELDS: ' \
'-b+[Begin time, same format as replay]:BEGIN: ' \
'--begin=[Begin time, same format as replay]:BEGIN: ' \
'-e+[End time, same format as replay]:END: ' \
'--end=[End time, same format as replay]:END: ' \
'--duration=[Time string specifying the duration, e.g. "10 min"{n} Keywords: days min, h, sec{n} Relative: {humantime}, e.g. "2 days 3 hr 15m 10sec"{n} _]:DURATION: ' \
'-F+[Take a regex and apply to --select selected field. See command level doc for example]:FILTER: ' \
'--filter=[Take a regex and apply to --select selected field. See command level doc for example]:FILTER: ' \
'--top=[]:TOP: ' \
'--repeat-title=[Repeat title, for each N line, it will render a line of title. Only for raw output format]:REPEAT_TITLE: ' \
'-O+[Output format. Choose from raw, csv, tsv, kv, json, openmetrics. Default to raw]:OUTPUT_FORMAT: ' \
'--output-format=[Output format. Choose from raw, csv, tsv, kv, json, openmetrics. Default to raw]:OUTPUT_FORMAT: ' \
'-o+[Output destination, default to stdout]:OUTPUT: ' \
'--output=[Output destination, default to stdout]:OUTPUT: ' \
'-r+[Days adjuster, same as -r option in replay]:YESTERDAYS: ' \
'--br=[Line break symbol between samples]:BR: ' \
'(-f --fields)-p+[Saved pattern in the dumprc file under \[network\] section]:PATTERN: ' \
'(-f --fields)--pattern=[Saved pattern in the dumprc file under \[network\] section]:PATTERN: ' \
'--default[Show all top layer fields. If --default is specified, it overrides any specified fields via --fields]' \
'--everything[Show all fields. If --everything is specified, --fields and --default are overridden]' \
'-d[Show more infomation other than default]' \
'--detail[Show more infomation other than default]' \
'--sort[Sort (lower to higher) by --select selected field. See command level doc for example]' \
'--rsort[Sort (higher to lower) by --select selected field. See command level doc for example]' \
'--disable-title[Disable title in raw, csv or tsv format output]' \
'--raw[Dump raw data without units or conversion]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(transport)
_arguments "${_arguments_options[@]}" \
'*-f+[Select which fields to display and in what order]:FIELDS: ' \
'*--fields=[Select which fields to display and in what order]:FIELDS: ' \
'-b+[Begin time, same format as replay]:BEGIN: ' \
'--begin=[Begin time, same format as replay]:BEGIN: ' \
'-e+[End time, same format as replay]:END: ' \
'--end=[End time, same format as replay]:END: ' \
'--duration=[Time string specifying the duration, e.g. "10 min"{n} Keywords: days min, h, sec{n} Relative: {humantime}, e.g. "2 days 3 hr 15m 10sec"{n} _]:DURATION: ' \
'-F+[Take a regex and apply to --select selected field. See command level doc for example]:FILTER: ' \
'--filter=[Take a regex and apply to --select selected field. See command level doc for example]:FILTER: ' \
'--top=[]:TOP: ' \
'--repeat-title=[Repeat title, for each N line, it will render a line of title. Only for raw output format]:REPEAT_TITLE: ' \
'-O+[Output format. Choose from raw, csv, tsv, kv, json, openmetrics. Default to raw]:OUTPUT_FORMAT: ' \
'--output-format=[Output format. Choose from raw, csv, tsv, kv, json, openmetrics. Default to raw]:OUTPUT_FORMAT: ' \
'-o+[Output destination, default to stdout]:OUTPUT: ' \
'--output=[Output destination, default to stdout]:OUTPUT: ' \
'-r+[Days adjuster, same as -r option in replay]:YESTERDAYS: ' \
'--br=[Line break symbol between samples]:BR: ' \
'(-f --fields)-p+[Saved pattern in the dumprc file under \[transport\] section]:PATTERN: ' \
'(-f --fields)--pattern=[Saved pattern in the dumprc file under \[transport\] section]:PATTERN: ' \
'--default[Show all top layer fields. If --default is specified, it overrides any specified fields via --fields]' \
'--everything[Show all fields. If --everything is specified, --fields and --default are overridden]' \
'-d[Show more infomation other than default]' \
'--detail[Show more infomation other than default]' \
'--sort[Sort (lower to higher) by --select selected field. See command level doc for example]' \
'--rsort[Sort (higher to lower) by --select selected field. See command level doc for example]' \
'--disable-title[Disable title in raw, csv or tsv format output]' \
'--raw[Dump raw data without units or conversion]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
        esac
    ;;
esac
;;
(snapshot)
_arguments "${_arguments_options[@]}" \
'-b+[Begin time, same format as replay]:BEGIN: ' \
'--begin=[Begin time, same format as replay]:BEGIN: ' \
'-e+[End time, same format as replay]:END: ' \
'--end=[End time, same format as replay]:END: ' \
'--duration=[Time string specifying the snapshot duration, e.g. "10 min"{n}
Keywords: days min, h, sec{n}
Relative: {humantime}, e.g. "2 days 3 hr 15m 10sec"{n}
_]:DURATION: ' \
'-o+[Output file path. Randomized name in current directory if unspecified]:OUTPUT: ' \
'--output=[Output file path. Randomized name in current directory if unspecified]:OUTPUT: ' \
'-s+[Supply hostname to take snapshot from remote]:HOST: ' \
'--host=[Supply hostname to take snapshot from remote]:HOST: ' \
'--port=[Override default port to connect to remote]:PORT: ' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(generate-completions)
_arguments "${_arguments_options[@]}" \
'-s+[The shell type]:SHELL: ' \
'--shell=[The shell type]:SHELL: ' \
'-o+[Output file, stdout if not present]:OUTPUT: ' \
'--output=[Output file, stdout if not present]:OUTPUT: ' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
        esac
    ;;
esac
}

(( $+functions[_below_commands] )) ||
_below_commands() {
    local commands; commands=(
'live:Display live system data (interactive) (default)' \
'record:Record local system data (daemon mode)' \
'replay:Replay historical data (interactive)' \
'debug:Debugging facilities (for development use)' \
'dump:Dump historical data into parseable text format' \
'snapshot:Create a historical snapshot file for a given time range' \
'generate-completions:Generate a shell completions file' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'below commands' commands "$@"
}
(( $+functions[_below__dump__btrfs_commands] )) ||
_below__dump__btrfs_commands() {
    local commands; commands=()
    _describe -t commands 'below dump btrfs commands' commands "$@"
}
(( $+functions[_below__dump__cgroup_commands] )) ||
_below__dump__cgroup_commands() {
    local commands; commands=()
    _describe -t commands 'below dump cgroup commands' commands "$@"
}
(( $+functions[_below__debug__convert-store_commands] )) ||
_below__debug__convert-store_commands() {
    local commands; commands=()
    _describe -t commands 'below debug convert-store commands' commands "$@"
}
(( $+functions[_below__debug_commands] )) ||
_below__debug_commands() {
    local commands; commands=(
'dump-store:' \
'convert-store:Convert frames from an existing store and write them to a new store. This can be used to test compression/serialization formats' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'below debug commands' commands "$@"
}
(( $+functions[_below__dump__disk_commands] )) ||
_below__dump__disk_commands() {
    local commands; commands=()
    _describe -t commands 'below dump disk commands' commands "$@"
}
(( $+functions[_below__dump_commands] )) ||
_below__dump_commands() {
    local commands; commands=(
'system:Dump system stats' \
'disk:Dump disk stats' \
'btrfs:Dump btrfs Stats' \
'process:Dump process stats' \
'cgroup:Dump cgroup stats' \
'iface:Dump the link layer iface stats' \
'network:Dump the network layer stats including ip and icmp' \
'transport:Dump the transport layer stats including tcp and udp' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'below dump commands' commands "$@"
}
(( $+functions[_below__debug__dump-store_commands] )) ||
_below__debug__dump-store_commands() {
    local commands; commands=()
    _describe -t commands 'below debug dump-store commands' commands "$@"
}
(( $+functions[_below__generate-completions_commands] )) ||
_below__generate-completions_commands() {
    local commands; commands=()
    _describe -t commands 'below generate-completions commands' commands "$@"
}
(( $+functions[_below__debug__help_commands] )) ||
_below__debug__help_commands() {
    local commands; commands=()
    _describe -t commands 'below debug help commands' commands "$@"
}
(( $+functions[_below__dump__help_commands] )) ||
_below__dump__help_commands() {
    local commands; commands=()
    _describe -t commands 'below dump help commands' commands "$@"
}
(( $+functions[_below__help_commands] )) ||
_below__help_commands() {
    local commands; commands=()
    _describe -t commands 'below help commands' commands "$@"
}
(( $+functions[_below__dump__iface_commands] )) ||
_below__dump__iface_commands() {
    local commands; commands=()
    _describe -t commands 'below dump iface commands' commands "$@"
}
(( $+functions[_below__live_commands] )) ||
_below__live_commands() {
    local commands; commands=()
    _describe -t commands 'below live commands' commands "$@"
}
(( $+functions[_below__dump__network_commands] )) ||
_below__dump__network_commands() {
    local commands; commands=()
    _describe -t commands 'below dump network commands' commands "$@"
}
(( $+functions[_below__dump__process_commands] )) ||
_below__dump__process_commands() {
    local commands; commands=()
    _describe -t commands 'below dump process commands' commands "$@"
}
(( $+functions[_below__record_commands] )) ||
_below__record_commands() {
    local commands; commands=()
    _describe -t commands 'below record commands' commands "$@"
}
(( $+functions[_below__replay_commands] )) ||
_below__replay_commands() {
    local commands; commands=()
    _describe -t commands 'below replay commands' commands "$@"
}
(( $+functions[_below__snapshot_commands] )) ||
_below__snapshot_commands() {
    local commands; commands=()
    _describe -t commands 'below snapshot commands' commands "$@"
}
(( $+functions[_below__dump__system_commands] )) ||
_below__dump__system_commands() {
    local commands; commands=()
    _describe -t commands 'below dump system commands' commands "$@"
}
(( $+functions[_below__dump__transport_commands] )) ||
_below__dump__transport_commands() {
    local commands; commands=()
    _describe -t commands 'below dump transport commands' commands "$@"
}

_below "$@"
