#compdef crictl

_crictl() {
  local -a cmds
  cmds=('attach:Attach to a running container' 'checkpoint:Checkpoint one or more running containers' 'completion:Output shell completion code' 'config:Get, set and list crictl configuration options' 'create:Create a new container' 'events:Stream the events of containers' 'event:Stream the events of containers' 'exec:Run a command in a running container' 'imagefsinfo:Return image filesystem info' 'images:List images' 'image:List images' 'img:List images' 'info:Display information of the container runtime' 'inspect:Display the status of one or more containers' 'inspecti:Return the status of one or more images' 'inspectp:Display the status of one or more pods' 'logs:Fetch the logs of a container' 'metricdescs:List metric descriptors. Returns information about the metrics available through the CRI.' 'metricsp:List pod metrics. Metrics are unstructured key/value pairs gathered by CRI meant to replace cAdvisor's /metrics/cadvisor endpoint.' 'pods:List pods' 'port-forward:Forward local port to a pod' 'ps:List containers' 'pull:Pull an image from a registry' 'rm:Remove one or more containers' 'rmi:Remove one or more images' 'rmp:Remove one or more pods' 'run:Run a new container inside a sandbox' 'runp:Run a new pod' 'runtime-config:Retrieve the container runtime configuration' 'start:Start one or more created containers' 'stats:List container(s) resource usage statistics' 'statsp:List pod statistics. Stats represent a structured API that will fulfill the Kubelet's /stats/summary endpoint.' 'stop:Stop one or more running containers' 'stopp:Stop one or more running pods' 'update:Update one or more running containers' 'update-runtime-config:Update the runtime configuration' 'version:Display runtime version information' 'help:Shows a list of commands or help for one command' 'h:Shows a list of commands or help for one command')
  _describe 'commands' cmds

  local -a opts
  opts=('--config' '--debug' '--enable-tracing' '--image-endpoint' '--profile-cpu' '--profile-mem' '--runtime-endpoint' '--timeout' '--tracing-endpoint' '--tracing-sampling-rate-per-million' '--help' '--version')
  _describe 'global options' opts

  return
}

compdef _crictl crictl
