_crictl() {
    local cur opts base
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    opts="attach
checkpoint
completion
config
create
events
event
exec
imagefsinfo
images
image
img
info
inspect
inspecti
inspectp
logs
metricdescs
metricsp
pods
port-forward
ps
pull
rm
rmi
rmp
run
runp
runtime-config
start
stats
statsp
stop
stopp
update
update-runtime-config
version
help
h
--config
--debug
--enable-tracing
--image-endpoint
--profile-cpu
--profile-mem
--runtime-endpoint
--timeout
--tracing-endpoint
--tracing-sampling-rate-per-million
--help
--version"
    COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
    return 0
}

complete -F _crictl crictl
