#compdef glances

# AUTOMATICALLY GENERATED by `shtab`


_shtab_glances_commands() {
  local _commands=(
    
  )
  _describe 'glances commands' _commands
}

_shtab_glances_options=(
  "(- : *)"{-h,--help}"[show this help message and exit]"
  "(- : *)--print-completion[print shell completion script]:print_completion:(bash zsh tcsh)"
  "(- : *)"{-V,--version}"[show program\'s version number and exit]"
  {-d,--debug}"[enable debug mode]"
  {-C,--config}"[path to the configuration file]:conf_file:_files"
  {-P,--plugins}"[path to additional plugin directory]:plugin_dir:"
  {--modules-list,--module-list}"[display modules (plugins \& exports) list and exit]"
  {--disable-plugin,--disable-plugins,--disable}"[disable plugin (comma-separated list or all). If all is used,                 then you need to configure --enable-plugin.]:disable_plugin:"
  {--enable-plugin,--enable-plugins,--enable}"[enable plugin (comma-separated list)]:enable_plugin:"
  "--disable-process[disable process module]"
  "--disable-webui[disable the Web Interface]"
  {--light,--enable-light}"[light mode for Curses UI (disable all but the top menu)]"
  {-0,--disable-irix}"[task\'s cpu usage will be divided by the total number of CPUs]"
  {-1,--percpu,--per-cpu}"[start Glances in per CPU mode]"
  {-2,--disable-left-sidebar}"[disable network, disk I\/O, FS and sensors modules]"
  {-3,--disable-quicklook}"[disable quick look module]"
  {-4,--full-quicklook}"[disable all but quick look and load]"
  {-5,--disable-top}"[disable top menu (QL, CPU, MEM, SWAP and LOAD)]"
  {-6,--meangpu}"[start Glances in mean GPU mode]"
  "--disable-history[disable stats history]"
  "--disable-bold[disable bold mode in the terminal]"
  "--disable-bg[disable background colors in the terminal]"
  "--enable-irq[enable IRQ module]"
  "--enable-process-extended[enable extended stats on top process]"
  "--disable-separator[disable separator in the UI (between top and others modules)]"
  "--disable-cursor[disable cursor (process selection) in the UI]"
  "--arrow-keys-sort[Use arrow keys to sort the process list instead of the SHIFT\+key combinations]"
  "--sort-processes[Sort processes by\: cpu_percent, memory_percent, username, cpu_times, io_counters, name, cpu_num]:sort_processes_key:(cpu_percent memory_percent username cpu_times io_counters name cpu_num)"
  {--programs,--program}"[Accumulate processes by program]"
  "--export[enable export module (comma-separated list)]:export:"
  "--export-csv-file[file path for CSV exporter]:export_csv_file:"
  "--export-csv-overwrite[overwrite existing CSV file]"
  "--export-json-file[file path for JSON exporter]:export_json_file:"
  "--export-graph-path[Folder for Graph exporter]:export_graph_path:"
  "--export-process-filter[set the export process filter (comma-separated list of regular expression)]:export_process_filter:"
  {-c,--client}"[connect to a Glances server by IPv4\/IPv6 address or hostname]:client:"
  {-s,--server}"[run Glances in server mode]"
  "--browser[start TUI Central Glances Browser (use --browser -w to start WebUI Central Glances Browser)]"
  "--disable-autodiscover[disable autodiscover feature]"
  {-p,--port}"[define the client\/server TCP port \[default\: 61209\]]:port:"
  {-B,--bind}"[bind server to the given IPv4\/IPv6 address or hostname]:bind_address:"
  "-u[use or define the given username]:username_used:"
  "--username[define or use an username]"
  "--password[define a client\/server password]"
  "--snmp-community[SNMP community]:snmp_community:"
  "--snmp-port[SNMP port]:snmp_port:"
  "--snmp-version[SNMP version (1, 2c or 3)]:snmp_version:"
  "--snmp-user[SNMP username (only for SNMPv3)]:snmp_user:"
  "--snmp-auth[SNMP authentication key (only for SNMPv3)]:snmp_auth:"
  "--snmp-force[force SNMP mode]"
  {-t,--time}"[set minimum refresh rate in seconds \[default\: 2 sec\]]:time:"
  {-w,--webserver}"[run Glances in web server mode (FastAPI, Uvicorn, Jinja2 libs needed)]"
  "--enable-mcp[enable the MCP (Model Context Protocol) server alongside the web server (mcp package needed)]"
  "--mcp-path[set the MCP server mount path \[default\: \/mcp\]]:mcp_path:"
  "--cached-time[set the server cache time \[default\: 1 sec\]]:cached_time:"
  "--stop-after[stop Glances after n refresh]:stop_after:"
  "--open-web-browser[try to open the Web UI in the default Web browser]"
  {-q,--quiet}"[do not display the curses interface]"
  {-f,--process-filter}"[set the process filter pattern (regular expression)]:process_filter:"
  "--process-focus[set a process list to focus on (comma-separated list of Glances filter)]:process_focus:"
  "--process-short-name[force short name for processes name]"
  "--process-long-name[force long name for processes name]"
  "--stdout[display stats to stdout, one stat per line (comma-separated list of plugins\/plugins.attribute)]:stdout:"
  "--stdout-json[display stats to stdout, JSON format (comma-separated list of plugins\/plugins.attribute)]:stdout_json:"
  "--stdout-csv[display stats to stdout, CSV format (comma-separated list of plugins\/plugins.attribute)]:stdout_csv:"
  "--issue[test all plugins and exit (please copy\/paste the output if you open an issue)]"
  "--trace-malloc[trace memory allocation and display it at the end of the process (python 3.4 or higher needed)]"
  "--memory-leak[test memory leak (python 3.4 or higher needed)]"
  "--api-doc[display Python API documentation]"
  "--api-restful-doc[display Restful API documentation]"
  "--hide-kernel-threads[hide kernel threads in the process list (not available on Windows)]"
  {-b,--byte}"[display network rate in bytes per second]"
  "--diskio-show-ramfs[show RAM Fs in the DiskIO plugin]"
  "--diskio-iops[show IO per second in the DiskIO plugin]"
  "--diskio-latency[show IO latency in the DiskIO plugin]"
  "--fahrenheit[display temperature in Fahrenheit (default is Celsius)]"
  "--fs-free-space[display FS free space instead of used]"
  "--sparkline[display sparklines instead of bar in the curses interface]"
  "--disable-unicode[disable unicode characters in the curses interface]"
  "--hide-public-info[hide public information (like public IP)]"
  "--disable-config-exec[disable backtick command execution in configuration values (recommended for system services)]"
  "--disable-check-update[disable online Glances version ckeck]"
  "--strftime[strftime format string for displaying current date in standalone mode]:strftime_format:"
  {--fetch,--stdout-fetch}"[display a (neo)fetch like summary and exit]"
  {--fetch-template,--stdout-fetch-template}"[overwrite default fetch template file]:fetch_template:"
)

# guard to ensure default positional specs are added only once per session
_shtab_glances_defaults_added=0


_shtab_glances() {
  local context state line curcontext="$curcontext" one_or_more='(*)' remainder='(-)*' default='*::: :->glances'

  # Add default positional/remainder specs only if none exist, and only once per session
  if (( ! _shtab_glances_defaults_added )); then
    if (( ${_shtab_glances_options[(I)${(q)one_or_more}*]} +          ${_shtab_glances_options[(I)${(q)remainder}*]} +          ${_shtab_glances_options[(I)${(q)default}]} == 0 )); then
      _shtab_glances_options+=(': :_shtab_glances_commands' '*::: :->glances')
    fi
    _shtab_glances_defaults_added=1
  fi
  _arguments -C -s $_shtab_glances_options

  case $state in
    glances)
      words=($line[1] "${words[@]}")
      (( CURRENT += 1 ))
      curcontext="${curcontext%:*:*}:_shtab_glances-$line[1]:"
      case $line[1] in
        
      esac
  esac
}



typeset -A opt_args

if [[ $zsh_eval_context[-1] == eval ]]; then
  # eval/source/. command, register function for later
  compdef _shtab_glances -N glances
else
  # autoload from fpath, call function directly
  _shtab_glances "$@"
fi

