# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

__kubectl_bash_source() {
	alias shopt=':'
	alias _expand=_bash_expand
	alias _complete=_bash_comp
	emulate -L sh
	setopt kshglob noshglob braceexpand

	source "$@"
}

__kubectl_type() {
	# -t is not supported by zsh
	if [ "$1" == "-t" ]; then
		shift

		# fake Bash 4 to disable "complete -o nospace". Instead
		# "compopt +-o nospace" is used in the code to toggle trailing
		# spaces. We don't support that, but leave trailing spaces on
		# all the time
		if [ "$1" = "__kubectl_compopt" ]; then
			echo builtin
			return 0
		fi
	fi
	type "$@"
}

__kubectl_compgen() {
	local completions w
	completions=( $(compgen "$@") ) || return $?

	# filter by given word as prefix
	while [[ "$1" = -* && "$1" != -- ]]; do
		shift
		shift
	done
	if [[ "$1" == -- ]]; then
		shift
	fi
	for w in "${completions[@]}"; do
		if [[ "${w}" = "$1"* ]]; then
			echo "${w}"
		fi
	done
}

__kubectl_compopt() {
	true # don't do anything. Not supported by bashcompinit in zsh
}

__kubectl_declare() {
	if [ "$1" == "-F" ]; then
		whence -w "$@"
	else
		builtin declare "$@"
	fi
}

__kubectl_ltrim_colon_completions()
{
	if [[ "$1" == *:* && "$COMP_WORDBREAKS" == *:* ]]; then
		# Remove colon-word prefix from COMPREPLY items
		local colon_word=${1%${1##*:}}
		local i=${#COMPREPLY[*]}
		while [[ $((--i)) -ge 0 ]]; do
			COMPREPLY[$i]=${COMPREPLY[$i]#"$colon_word"}
		done
	fi
}

__kubectl_get_comp_words_by_ref() {
	cur="${COMP_WORDS[COMP_CWORD]}"
	prev="${COMP_WORDS[${COMP_CWORD}-1]}"
	words=("${COMP_WORDS[@]}")
	cword=("${COMP_CWORD[@]}")
}

__kubectl_filedir() {
	local RET OLD_IFS w qw

	__debug "_filedir $@ cur=$cur"
	if [[ "$1" = \~* ]]; then
		# somehow does not work. Maybe, zsh does not call this at all
		eval echo "$1"
		return 0
	fi

	OLD_IFS="$IFS"
	IFS=$'\n'
	if [ "$1" = "-d" ]; then
		shift
		RET=( $(compgen -d) )
	else
		RET=( $(compgen -f) )
	fi
	IFS="$OLD_IFS"

	IFS="," __debug "RET=${RET[@]} len=${#RET[@]}"

	for w in ${RET[@]}; do
		if [[ ! "${w}" = "${cur}"* ]]; then
			continue
		fi
		if eval "[[ \"\${w}\" = *.$1 || -d \"\${w}\" ]]"; then
			qw="$(__kubectl_quote "${w}")"
			if [ -d "${w}" ]; then
				COMPREPLY+=("${qw}/")
			else
				COMPREPLY+=("${qw}")
			fi
		fi
	done
}

__kubectl_quote() {
    if [[ $1 == \'* || $1 == \"* ]]; then
        # Leave out first character
        printf %q "${1:1}"
    else
    	printf %q "$1"
    fi
}

autoload -U +X bashcompinit && bashcompinit

# use word boundary patterns for BSD or GNU sed
LWORD='[[:<:]]'
RWORD='[[:>:]]'
if sed --help 2>&1 | grep -q GNU; then
	LWORD='\<'
	RWORD='\>'
fi

__kubectl_convert_bash_to_zsh() {
	sed \
	-e 's/declare -F/whence -w/' \
	-e 's/local \([a-zA-Z0-9_]*\)=/local \1; \1=/' \
	-e 's/flags+=("\(--.*\)=")/flags+=("\1"); two_word_flags+=("\1")/' \
	-e 's/must_have_one_flag+=("\(--.*\)=")/must_have_one_flag+=("\1")/' \
	-e "s/${LWORD}_filedir${RWORD}/__kubectl_filedir/g" \
	-e "s/${LWORD}_get_comp_words_by_ref${RWORD}/__kubectl_get_comp_words_by_ref/g" \
	-e "s/${LWORD}__ltrim_colon_completions${RWORD}/__kubectl_ltrim_colon_completions/g" \
	-e "s/${LWORD}compgen${RWORD}/__kubectl_compgen/g" \
	-e "s/${LWORD}compopt${RWORD}/__kubectl_compopt/g" \
	-e "s/${LWORD}declare${RWORD}/__kubectl_declare/g" \
	-e "s/\\\$(type${RWORD}/\$(__kubectl_type/g" \
	<<'BASH_COMPLETION_EOF'
# bash completion for oc                                   -*- shell-script -*-

__debug()
{
    if [[ -n ${BASH_COMP_DEBUG_FILE} ]]; then
        echo "$*" >> "${BASH_COMP_DEBUG_FILE}"
    fi
}

# Homebrew on Macs have version 1.3 of bash-completion which doesn't include
# _init_completion. This is a very minimal version of that function.
__my_init_completion()
{
    COMPREPLY=()
    _get_comp_words_by_ref "$@" cur prev words cword
}

__index_of_word()
{
    local w word=$1
    shift
    index=0
    for w in "$@"; do
        [[ $w = "$word" ]] && return
        index=$((index+1))
    done
    index=-1
}

__contains_word()
{
    local w word=$1; shift
    for w in "$@"; do
        [[ $w = "$word" ]] && return
    done
    return 1
}

__handle_reply()
{
    __debug "${FUNCNAME[0]}"
    case $cur in
        -*)
            if [[ $(type -t compopt) = "builtin" ]]; then
                compopt -o nospace
            fi
            local allflags
            if [ ${#must_have_one_flag[@]} -ne 0 ]; then
                allflags=("${must_have_one_flag[@]}")
            else
                allflags=("${flags[*]} ${two_word_flags[*]}")
            fi
            COMPREPLY=( $(compgen -W "${allflags[*]}" -- "$cur") )
            if [[ $(type -t compopt) = "builtin" ]]; then
                [[ "${COMPREPLY[0]}" == *= ]] || compopt +o nospace
            fi

            # complete after --flag=abc
            if [[ $cur == *=* ]]; then
                if [[ $(type -t compopt) = "builtin" ]]; then
                    compopt +o nospace
                fi

                local index flag
                flag="${cur%%=*}"
                __index_of_word "${flag}" "${flags_with_completion[@]}"
                if [[ ${index} -ge 0 ]]; then
                    COMPREPLY=()
                    PREFIX=""
                    cur="${cur#*=}"
                    ${flags_completion[${index}]}
                    if [ -n "${ZSH_VERSION}" ]; then
                        # zfs completion needs --flag= prefix
                        eval "COMPREPLY=( \"\${COMPREPLY[@]/#/${flag}=}\" )"
                    fi
                fi
            fi
            return 0;
            ;;
    esac

    # check if we are handling a flag with special work handling
    local index
    __index_of_word "${prev}" "${flags_with_completion[@]}"
    if [[ ${index} -ge 0 ]]; then
        ${flags_completion[${index}]}
        return
    fi

    # we are parsing a flag and don't have a special handler, no completion
    if [[ ${cur} != "${words[cword]}" ]]; then
        return
    fi

    local completions
    completions=("${commands[@]}")
    if [[ ${#must_have_one_noun[@]} -ne 0 ]]; then
        completions=("${must_have_one_noun[@]}")
    fi
    if [[ ${#must_have_one_flag[@]} -ne 0 ]]; then
        completions+=("${must_have_one_flag[@]}")
    fi
    COMPREPLY=( $(compgen -W "${completions[*]}" -- "$cur") )

    if [[ ${#COMPREPLY[@]} -eq 0 && ${#noun_aliases[@]} -gt 0 && ${#must_have_one_noun[@]} -ne 0 ]]; then
        COMPREPLY=( $(compgen -W "${noun_aliases[*]}" -- "$cur") )
    fi

    if [[ ${#COMPREPLY[@]} -eq 0 ]]; then
        declare -F __custom_func >/dev/null && __custom_func
    fi

    __ltrim_colon_completions "$cur"
}

# The arguments should be in the form "ext1|ext2|extn"
__handle_filename_extension_flag()
{
    local ext="$1"
    _filedir "@(${ext})"
}

__handle_subdirs_in_dir_flag()
{
    local dir="$1"
    pushd "${dir}" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1
}

__handle_flag()
{
    __debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}"

    # if a command required a flag, and we found it, unset must_have_one_flag()
    local flagname=${words[c]}
    local flagvalue
    # if the word contained an =
    if [[ ${words[c]} == *"="* ]]; then
        flagvalue=${flagname#*=} # take in as flagvalue after the =
        flagname=${flagname%%=*} # strip everything after the =
        flagname="${flagname}=" # but put the = back
    fi
    __debug "${FUNCNAME[0]}: looking for ${flagname}"
    if __contains_word "${flagname}" "${must_have_one_flag[@]}"; then
        must_have_one_flag=()
    fi

    # if you set a flag which only applies to this command, don't show subcommands
    if __contains_word "${flagname}" "${local_nonpersistent_flags[@]}"; then
      commands=()
    fi

    # keep flag value with flagname as flaghash
    if [ -n "${flagvalue}" ] ; then
        flaghash[${flagname}]=${flagvalue}
    elif [ -n "${words[ $((c+1)) ]}" ] ; then
        flaghash[${flagname}]=${words[ $((c+1)) ]}
    else
        flaghash[${flagname}]="true" # pad "true" for bool flag
    fi

    # skip the argument to a two word flag
    if __contains_word "${words[c]}" "${two_word_flags[@]}"; then
        c=$((c+1))
        # if we are looking for a flags value, don't show commands
        if [[ $c -eq $cword ]]; then
            commands=()
        fi
    fi

    c=$((c+1))

}

__handle_noun()
{
    __debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}"

    if __contains_word "${words[c]}" "${must_have_one_noun[@]}"; then
        must_have_one_noun=()
    elif __contains_word "${words[c]}" "${noun_aliases[@]}"; then
        must_have_one_noun=()
    fi

    nouns+=("${words[c]}")
    c=$((c+1))
}

__handle_command()
{
    __debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}"

    local next_command
    if [[ -n ${last_command} ]]; then
        next_command="_${last_command}_${words[c]//:/__}"
    else
        if [[ $c -eq 0 ]]; then
            next_command="_$(basename "${words[c]//:/__}")"
        else
            next_command="_${words[c]//:/__}"
        fi
    fi
    c=$((c+1))
    __debug "${FUNCNAME[0]}: looking for ${next_command}"
    declare -F $next_command >/dev/null && $next_command
}

__handle_word()
{
    if [[ $c -ge $cword ]]; then
        __handle_reply
        return
    fi
    __debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}"
    if [[ "${words[c]}" == -* ]]; then
        __handle_flag
    elif __contains_word "${words[c]}" "${commands[@]}"; then
        __handle_command
    elif [[ $c -eq 0 ]] && __contains_word "$(basename "${words[c]}")" "${commands[@]}"; then
        __handle_command
    else
        __handle_noun
    fi
    __handle_word
}

# call oc get $1,
__oc_parse_get()
{

    local template
    template="{{ range .items  }}{{ .metadata.name }} {{ end }}"
    local oc_out
    if oc_out=$(oc get -o template --template="${template}" "$1" 2>/dev/null); then
        COMPREPLY=( $( compgen -W "${oc_out[*]}" -- "$cur" ) )
    fi
}

__oc_get_resource()
{
    if [[ ${#nouns[@]} -eq 0 ]]; then
        return 1
    fi
    __oc_parse_get ${nouns[${#nouns[@]} -1]}
}

# $1 is the name of the pod we want to get the list of containers inside
__oc_get_containers()
{
    local template
    template="{{ range .spec.containers  }}{{ .name }} {{ end }}"
    __debug ${FUNCNAME} "nouns are ${nouns[@]}"

    local len="${#nouns[@]}"
    if [[ ${len} -ne 1 ]]; then
        return
    fi
    local last=${nouns[${len} -1]}
    local oc_out
    if oc_out=$(oc get -o template --template="${template}" pods "${last}" 2>/dev/null); then
        COMPREPLY=( $( compgen -W "${oc_out[*]}" -- "$cur" ) )
    fi
}

# Require both a pod and a container to be specified
__oc_require_pod_and_container()
{
    if [[ ${#nouns[@]} -eq 0 ]]; then
        __oc_parse_get pods
        return 0
    fi;
    __oc_get_containers
    return 0
}

__custom_func() {
    case ${last_command} in
 
        # first arg is the kind according to ValidArgs, second is resource name
        oc_get | oc_describe | oc_delete | oc_label | oc_stop | oc_expose | oc_export | oc_patch | oc_annotate | oc_env | oc_edit | oc_volume | oc_scale )
            __oc_get_resource
            return
            ;;

        # first arg is a pod name
        oc_rsh | oc_exec)
            if [[ ${#nouns[@]} -eq 0 ]]; then
                __oc_parse_get pods
            fi;
            return
            ;;
 
        # first arg is a pod name, second is a container name
        oc_logs | oc_attach)
            __oc_require_pod_and_container
            return
            ;;
 
        # args other than the first are filenames
        oc_secrets_new)
            # Complete args other than the first as filenames
            if [[ ${#nouns[@]} -gt 0 ]]; then
                _filedir
            fi;
            return
            ;;
 
        # first arg is a build config name
        oc_start-build | oc_cancel-build)
            if [[ ${#nouns[@]} -eq 0 ]]; then
                __oc_parse_get buildconfigs
            fi;
            return
            ;;
 
        # first arg is a deployment config
        oc_deploy)
            if [[ ${#nouns[@]} -eq 0 ]]; then
                __oc_parse_get deploymentconfigs
            fi;
            return
            ;;
 
        # first arg is a deployment config OR deployment
        oc_rollback)
            if [[ ${#nouns[@]} -eq 0 ]]; then
                __oc_parse_get deploymentconfigs,replicationcontrollers
            fi;
            return
            ;;

        # first arg is a project name
        oc_project)
            if [[ ${#nouns[@]} -eq 0 ]]; then
                __oc_parse_get projects
            fi;
            return
            ;;
 
        # first arg is an image stream
        oc_import-image)
            if [[ ${#nouns[@]} -eq 0 ]]; then
                __oc_parse_get imagestreams
            fi;
            return
            ;;
 
        *)
            ;;
    esac
}

_oc_adm_build-chain()
{
    last_command="oc_adm_build-chain"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all")
    local_nonpersistent_flags+=("--all")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--reverse")
    local_nonpersistent_flags+=("--reverse")
    flags+=("--trigger-only")
    local_nonpersistent_flags+=("--trigger-only")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_ca_create-key-pair()
{
    last_command="oc_adm_ca_create-key-pair"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--overwrite")
    local_nonpersistent_flags+=("--overwrite")
    flags+=("--private-key=")
    flags_with_completion+=("--private-key")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--private-key=")
    flags+=("--public-key=")
    flags_with_completion+=("--public-key")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--public-key=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_ca_create-master-certs()
{
    last_command="oc_adm_ca_create-master-certs"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--cert-dir=")
    flags_with_completion+=("--cert-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--cert-dir=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--certificate-authority=")
    flags+=("--hostnames=")
    local_nonpersistent_flags+=("--hostnames=")
    flags+=("--master=")
    local_nonpersistent_flags+=("--master=")
    flags+=("--overwrite")
    local_nonpersistent_flags+=("--overwrite")
    flags+=("--public-master=")
    local_nonpersistent_flags+=("--public-master=")
    flags+=("--signer-name=")
    local_nonpersistent_flags+=("--signer-name=")
    flags+=("--as=")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_ca_create-server-cert()
{
    last_command="oc_adm_ca_create-server-cert"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--cert=")
    flags_with_completion+=("--cert")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--cert=")
    flags+=("--hostnames=")
    local_nonpersistent_flags+=("--hostnames=")
    flags+=("--key=")
    flags_with_completion+=("--key")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--key=")
    flags+=("--overwrite")
    local_nonpersistent_flags+=("--overwrite")
    flags+=("--signer-cert=")
    flags_with_completion+=("--signer-cert")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--signer-cert=")
    flags+=("--signer-key=")
    flags_with_completion+=("--signer-key")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--signer-key=")
    flags+=("--signer-serial=")
    flags_with_completion+=("--signer-serial")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--signer-serial=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_ca_create-signer-cert()
{
    last_command="oc_adm_ca_create-signer-cert"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--cert=")
    flags_with_completion+=("--cert")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--cert=")
    flags+=("--key=")
    flags_with_completion+=("--key")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--key=")
    flags+=("--name=")
    local_nonpersistent_flags+=("--name=")
    flags+=("--overwrite")
    local_nonpersistent_flags+=("--overwrite")
    flags+=("--serial=")
    flags_with_completion+=("--serial")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--serial=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_ca_decrypt()
{
    last_command="oc_adm_ca_decrypt"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--in=")
    flags_with_completion+=("--in")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--in=")
    flags+=("--key=")
    flags_with_completion+=("--key")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--key=")
    flags+=("--out=")
    flags_with_completion+=("--out")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--out=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_ca_encrypt()
{
    last_command="oc_adm_ca_encrypt"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--genkey=")
    flags_with_completion+=("--genkey")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--genkey=")
    flags+=("--in=")
    flags_with_completion+=("--in")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--in=")
    flags+=("--key=")
    flags_with_completion+=("--key")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--key=")
    flags+=("--out=")
    flags_with_completion+=("--out")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--out=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_ca()
{
    last_command="oc_adm_ca"
    commands=()
    commands+=("create-key-pair")
    commands+=("create-master-certs")
    commands+=("create-server-cert")
    commands+=("create-signer-cert")
    commands+=("decrypt")
    commands+=("encrypt")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_completion()
{
    last_command="oc_adm_completion"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    must_have_one_noun+=("bash")
    must_have_one_noun+=("zsh")
    noun_aliases=()
}

_oc_adm_config_current-context()
{
    last_command="oc_adm_config_current-context"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_config_delete-cluster()
{
    last_command="oc_adm_config_delete-cluster"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_config_delete-context()
{
    last_command="oc_adm_config_delete-context"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_config_get-clusters()
{
    last_command="oc_adm_config_get-clusters"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_config_get-contexts()
{
    last_command="oc_adm_config_get-contexts"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_config_set()
{
    last_command="oc_adm_config_set"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--set-raw-bytes")
    local_nonpersistent_flags+=("--set-raw-bytes")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_config_set-cluster()
{
    last_command="oc_adm_config_set-cluster"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--api-version=")
    local_nonpersistent_flags+=("--api-version=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--certificate-authority=")
    flags+=("--embed-certs")
    local_nonpersistent_flags+=("--embed-certs")
    flags+=("--insecure-skip-tls-verify")
    local_nonpersistent_flags+=("--insecure-skip-tls-verify")
    flags+=("--server=")
    local_nonpersistent_flags+=("--server=")
    flags+=("--as=")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_config_set-context()
{
    last_command="oc_adm_config_set-context"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--cluster=")
    local_nonpersistent_flags+=("--cluster=")
    flags+=("--namespace=")
    local_nonpersistent_flags+=("--namespace=")
    flags+=("--user=")
    local_nonpersistent_flags+=("--user=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_config_set-credentials()
{
    last_command="oc_adm_config_set-credentials"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--auth-provider=")
    local_nonpersistent_flags+=("--auth-provider=")
    flags+=("--auth-provider-arg=")
    local_nonpersistent_flags+=("--auth-provider-arg=")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--client-certificate=")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--client-key=")
    flags+=("--embed-certs")
    local_nonpersistent_flags+=("--embed-certs")
    flags+=("--password=")
    local_nonpersistent_flags+=("--password=")
    flags+=("--token=")
    local_nonpersistent_flags+=("--token=")
    flags+=("--username=")
    local_nonpersistent_flags+=("--username=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_config_unset()
{
    last_command="oc_adm_config_unset"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_config_use-context()
{
    last_command="oc_adm_config_use-context"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_config_view()
{
    last_command="oc_adm_config_view"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--flatten")
    local_nonpersistent_flags+=("--flatten")
    flags+=("--merge")
    local_nonpersistent_flags+=("--merge")
    flags+=("--minify")
    local_nonpersistent_flags+=("--minify")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--raw")
    local_nonpersistent_flags+=("--raw")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_config()
{
    last_command="oc_adm_config"
    commands=()
    commands+=("current-context")
    commands+=("delete-cluster")
    commands+=("delete-context")
    commands+=("get-clusters")
    commands+=("get-contexts")
    commands+=("set")
    commands+=("set-cluster")
    commands+=("set-context")
    commands+=("set-credentials")
    commands+=("unset")
    commands+=("use-context")
    commands+=("view")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--config=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_cordon()
{
    last_command="oc_adm_cordon"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_create-api-client-config()
{
    last_command="oc_adm_create-api-client-config"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--basename=")
    local_nonpersistent_flags+=("--basename=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--certificate-authority=")
    flags+=("--client-dir=")
    flags_with_completion+=("--client-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--client-dir=")
    flags+=("--groups=")
    local_nonpersistent_flags+=("--groups=")
    flags+=("--master=")
    local_nonpersistent_flags+=("--master=")
    flags+=("--public-master=")
    local_nonpersistent_flags+=("--public-master=")
    flags+=("--signer-cert=")
    flags_with_completion+=("--signer-cert")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--signer-cert=")
    flags+=("--signer-key=")
    flags_with_completion+=("--signer-key")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--signer-key=")
    flags+=("--signer-serial=")
    flags_with_completion+=("--signer-serial")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--signer-serial=")
    flags+=("--user=")
    local_nonpersistent_flags+=("--user=")
    flags+=("--as=")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_create-bootstrap-policy-file()
{
    last_command="oc_adm_create-bootstrap-policy-file"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--openshift-namespace=")
    local_nonpersistent_flags+=("--openshift-namespace=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_create-bootstrap-project-template()
{
    last_command="oc_adm_create-bootstrap-project-template"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--name=")
    local_nonpersistent_flags+=("--name=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_create-error-template()
{
    last_command="oc_adm_create-error-template"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_create-kubeconfig()
{
    last_command="oc_adm_create-kubeconfig"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--certificate-authority=")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--client-certificate=")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--client-key=")
    flags+=("--kubeconfig=")
    flags_with_completion+=("--kubeconfig")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--kubeconfig=")
    flags+=("--master=")
    local_nonpersistent_flags+=("--master=")
    flags+=("--namespace=")
    local_nonpersistent_flags+=("--namespace=")
    flags+=("--public-master=")
    local_nonpersistent_flags+=("--public-master=")
    flags+=("--as=")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_create-login-template()
{
    last_command="oc_adm_create-login-template"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_create-node-config()
{
    last_command="oc_adm_create-node-config"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--allow-disabled-docker")
    local_nonpersistent_flags+=("--allow-disabled-docker")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--certificate-authority=")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--client-certificate=")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--client-key=")
    flags+=("--dns-domain=")
    local_nonpersistent_flags+=("--dns-domain=")
    flags+=("--dns-ip=")
    local_nonpersistent_flags+=("--dns-ip=")
    flags+=("--hostnames=")
    local_nonpersistent_flags+=("--hostnames=")
    flags+=("--images=")
    local_nonpersistent_flags+=("--images=")
    flags+=("--latest-images")
    local_nonpersistent_flags+=("--latest-images")
    flags+=("--listen=")
    local_nonpersistent_flags+=("--listen=")
    flags+=("--master=")
    local_nonpersistent_flags+=("--master=")
    flags+=("--network-plugin=")
    local_nonpersistent_flags+=("--network-plugin=")
    flags+=("--node=")
    local_nonpersistent_flags+=("--node=")
    flags+=("--node-client-certificate-authority=")
    flags_with_completion+=("--node-client-certificate-authority")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--node-client-certificate-authority=")
    flags+=("--node-dir=")
    flags_with_completion+=("--node-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--node-dir=")
    flags+=("--server-certificate=")
    flags_with_completion+=("--server-certificate")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--server-certificate=")
    flags+=("--server-key=")
    flags_with_completion+=("--server-key")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--server-key=")
    flags+=("--signer-cert=")
    flags_with_completion+=("--signer-cert")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--signer-cert=")
    flags+=("--signer-key=")
    flags_with_completion+=("--signer-key")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--signer-key=")
    flags+=("--signer-serial=")
    flags_with_completion+=("--signer-serial")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--signer-serial=")
    flags+=("--volume-dir=")
    flags_with_completion+=("--volume-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--volume-dir=")
    flags+=("--as=")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_create-provider-selection-template()
{
    last_command="oc_adm_create-provider-selection-template"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_diagnostics()
{
    last_command="oc_adm_diagnostics"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--cluster-context=")
    local_nonpersistent_flags+=("--cluster-context=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--config=")
    flags+=("--context=")
    local_nonpersistent_flags+=("--context=")
    flags+=("--diaglevel=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--diaglevel=")
    flags+=("--host")
    local_nonpersistent_flags+=("--host")
    flags+=("--images=")
    local_nonpersistent_flags+=("--images=")
    flags+=("--latest-images")
    local_nonpersistent_flags+=("--latest-images")
    flags+=("--loglevel=")
    local_nonpersistent_flags+=("--loglevel=")
    flags+=("--logspec=")
    local_nonpersistent_flags+=("--logspec=")
    flags+=("--master-config=")
    local_nonpersistent_flags+=("--master-config=")
    flags+=("--node-config=")
    local_nonpersistent_flags+=("--node-config=")
    flags+=("--prevent-modification")
    local_nonpersistent_flags+=("--prevent-modification")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_drain()
{
    last_command="oc_adm_drain"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--delete-local-data")
    local_nonpersistent_flags+=("--delete-local-data")
    flags+=("--force")
    local_nonpersistent_flags+=("--force")
    flags+=("--grace-period=")
    local_nonpersistent_flags+=("--grace-period=")
    flags+=("--ignore-daemonsets")
    local_nonpersistent_flags+=("--ignore-daemonsets")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_groups_add-users()
{
    last_command="oc_adm_groups_add-users"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_groups_new()
{
    last_command="oc_adm_groups_new"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_groups_prune()
{
    last_command="oc_adm_groups_prune"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--blacklist=")
    flags_with_completion+=("--blacklist")
    flags_completion+=("__handle_filename_extension_flag txt")
    local_nonpersistent_flags+=("--blacklist=")
    flags+=("--confirm")
    local_nonpersistent_flags+=("--confirm")
    flags+=("--sync-config=")
    flags_with_completion+=("--sync-config")
    flags_completion+=("__handle_filename_extension_flag yaml|yml")
    local_nonpersistent_flags+=("--sync-config=")
    flags+=("--whitelist=")
    flags_with_completion+=("--whitelist")
    flags_completion+=("__handle_filename_extension_flag txt")
    local_nonpersistent_flags+=("--whitelist=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_groups_remove-users()
{
    last_command="oc_adm_groups_remove-users"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_groups_sync()
{
    last_command="oc_adm_groups_sync"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--blacklist=")
    flags_with_completion+=("--blacklist")
    flags_completion+=("__handle_filename_extension_flag txt")
    local_nonpersistent_flags+=("--blacklist=")
    flags+=("--confirm")
    local_nonpersistent_flags+=("--confirm")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--sync-config=")
    flags_with_completion+=("--sync-config")
    flags_completion+=("__handle_filename_extension_flag yaml|yml")
    local_nonpersistent_flags+=("--sync-config=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--type=")
    local_nonpersistent_flags+=("--type=")
    flags+=("--whitelist=")
    flags_with_completion+=("--whitelist")
    flags_completion+=("__handle_filename_extension_flag txt")
    local_nonpersistent_flags+=("--whitelist=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_groups()
{
    last_command="oc_adm_groups"
    commands=()
    commands+=("add-users")
    commands+=("new")
    commands+=("prune")
    commands+=("remove-users")
    commands+=("sync")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_ipfailover()
{
    last_command="oc_adm_ipfailover"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--create")
    local_nonpersistent_flags+=("--create")
    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--images=")
    local_nonpersistent_flags+=("--images=")
    flags+=("--interface=")
    two_word_flags+=("-i")
    local_nonpersistent_flags+=("--interface=")
    flags+=("--iptables-chain=")
    local_nonpersistent_flags+=("--iptables-chain=")
    flags+=("--latest-images")
    local_nonpersistent_flags+=("--latest-images")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--replicas=")
    two_word_flags+=("-r")
    local_nonpersistent_flags+=("--replicas=")
    flags+=("--selector=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--service-account=")
    local_nonpersistent_flags+=("--service-account=")
    flags+=("--type=")
    local_nonpersistent_flags+=("--type=")
    flags+=("--virtual-ips=")
    local_nonpersistent_flags+=("--virtual-ips=")
    flags+=("--vrrp-id-offset=")
    local_nonpersistent_flags+=("--vrrp-id-offset=")
    flags+=("--watch-port=")
    two_word_flags+=("-w")
    local_nonpersistent_flags+=("--watch-port=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_manage-node()
{
    last_command="oc_adm_manage-node"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--evacuate")
    local_nonpersistent_flags+=("--evacuate")
    flags+=("--force")
    local_nonpersistent_flags+=("--force")
    flags+=("--grace-period=")
    local_nonpersistent_flags+=("--grace-period=")
    flags+=("--list-pods")
    local_nonpersistent_flags+=("--list-pods")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--pod-selector=")
    local_nonpersistent_flags+=("--pod-selector=")
    flags+=("--schedulable")
    local_nonpersistent_flags+=("--schedulable")
    flags+=("--selector=")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_migrate_image-references()
{
    last_command="oc_adm_migrate_image-references"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all-namespaces")
    local_nonpersistent_flags+=("--all-namespaces")
    flags+=("--confirm")
    local_nonpersistent_flags+=("--confirm")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--from-key=")
    local_nonpersistent_flags+=("--from-key=")
    flags+=("--include=")
    local_nonpersistent_flags+=("--include=")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--to-key=")
    local_nonpersistent_flags+=("--to-key=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_flag+=("--filename=")
    must_have_one_flag+=("-f")
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_migrate_storage()
{
    last_command="oc_adm_migrate_storage"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all-namespaces")
    local_nonpersistent_flags+=("--all-namespaces")
    flags+=("--confirm")
    local_nonpersistent_flags+=("--confirm")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--from-key=")
    local_nonpersistent_flags+=("--from-key=")
    flags+=("--include=")
    local_nonpersistent_flags+=("--include=")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--to-key=")
    local_nonpersistent_flags+=("--to-key=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_flag+=("--filename=")
    must_have_one_flag+=("-f")
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_migrate()
{
    last_command="oc_adm_migrate"
    commands=()
    commands+=("image-references")
    commands+=("storage")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_new-project()
{
    last_command="oc_adm_new-project"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--admin=")
    local_nonpersistent_flags+=("--admin=")
    flags+=("--admin-role=")
    local_nonpersistent_flags+=("--admin-role=")
    flags+=("--description=")
    local_nonpersistent_flags+=("--description=")
    flags+=("--display-name=")
    local_nonpersistent_flags+=("--display-name=")
    flags+=("--node-selector=")
    local_nonpersistent_flags+=("--node-selector=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_options()
{
    last_command="oc_adm_options"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_overwrite-policy()
{
    last_command="oc_adm_overwrite-policy"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--force")
    flags+=("-f")
    local_nonpersistent_flags+=("--force")
    flags+=("--master-config=")
    flags_with_completion+=("--master-config")
    flags_completion+=("__handle_filename_extension_flag yaml|yml")
    local_nonpersistent_flags+=("--master-config=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_pod-network_isolate-projects()
{
    last_command="oc_adm_pod-network_isolate-projects"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--selector=")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_pod-network_join-projects()
{
    last_command="oc_adm_pod-network_join-projects"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--selector=")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--to=")
    local_nonpersistent_flags+=("--to=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_pod-network_make-projects-global()
{
    last_command="oc_adm_pod-network_make-projects-global"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--selector=")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_pod-network()
{
    last_command="oc_adm_pod-network"
    commands=()
    commands+=("isolate-projects")
    commands+=("join-projects")
    commands+=("make-projects-global")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_policy_add-cluster-role-to-group()
{
    last_command="oc_adm_policy_add-cluster-role-to-group"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_policy_add-cluster-role-to-user()
{
    last_command="oc_adm_policy_add-cluster-role-to-user"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_policy_add-role-to-group()
{
    last_command="oc_adm_policy_add-role-to-group"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--role-namespace=")
    local_nonpersistent_flags+=("--role-namespace=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_policy_add-role-to-user()
{
    last_command="oc_adm_policy_add-role-to-user"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--role-namespace=")
    local_nonpersistent_flags+=("--role-namespace=")
    flags+=("--serviceaccount=")
    two_word_flags+=("-z")
    local_nonpersistent_flags+=("--serviceaccount=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_policy_add-scc-to-group()
{
    last_command="oc_adm_policy_add-scc-to-group"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_policy_add-scc-to-user()
{
    last_command="oc_adm_policy_add-scc-to-user"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--serviceaccount=")
    two_word_flags+=("-z")
    local_nonpersistent_flags+=("--serviceaccount=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_policy_reconcile-cluster-role-bindings()
{
    last_command="oc_adm_policy_reconcile-cluster-role-bindings"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--additive-only")
    local_nonpersistent_flags+=("--additive-only")
    flags+=("--confirm")
    local_nonpersistent_flags+=("--confirm")
    flags+=("--exclude-groups=")
    local_nonpersistent_flags+=("--exclude-groups=")
    flags+=("--exclude-users=")
    local_nonpersistent_flags+=("--exclude-users=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_policy_reconcile-cluster-roles()
{
    last_command="oc_adm_policy_reconcile-cluster-roles"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--additive-only")
    local_nonpersistent_flags+=("--additive-only")
    flags+=("--confirm")
    local_nonpersistent_flags+=("--confirm")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_policy_reconcile-sccs()
{
    last_command="oc_adm_policy_reconcile-sccs"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--additive-only")
    local_nonpersistent_flags+=("--additive-only")
    flags+=("--confirm")
    local_nonpersistent_flags+=("--confirm")
    flags+=("--infrastructure-namespace=")
    local_nonpersistent_flags+=("--infrastructure-namespace=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_policy_remove-cluster-role-from-group()
{
    last_command="oc_adm_policy_remove-cluster-role-from-group"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_policy_remove-cluster-role-from-user()
{
    last_command="oc_adm_policy_remove-cluster-role-from-user"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_policy_remove-group()
{
    last_command="oc_adm_policy_remove-group"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_policy_remove-role-from-group()
{
    last_command="oc_adm_policy_remove-role-from-group"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--role-namespace=")
    local_nonpersistent_flags+=("--role-namespace=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_policy_remove-role-from-user()
{
    last_command="oc_adm_policy_remove-role-from-user"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--role-namespace=")
    local_nonpersistent_flags+=("--role-namespace=")
    flags+=("--serviceaccount=")
    two_word_flags+=("-z")
    local_nonpersistent_flags+=("--serviceaccount=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_policy_remove-scc-from-group()
{
    last_command="oc_adm_policy_remove-scc-from-group"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_policy_remove-scc-from-user()
{
    last_command="oc_adm_policy_remove-scc-from-user"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--serviceaccount=")
    two_word_flags+=("-z")
    local_nonpersistent_flags+=("--serviceaccount=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_policy_remove-user()
{
    last_command="oc_adm_policy_remove-user"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_policy_who-can()
{
    last_command="oc_adm_policy_who-can"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all-namespaces")
    local_nonpersistent_flags+=("--all-namespaces")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_policy()
{
    last_command="oc_adm_policy"
    commands=()
    commands+=("add-cluster-role-to-group")
    commands+=("add-cluster-role-to-user")
    commands+=("add-role-to-group")
    commands+=("add-role-to-user")
    commands+=("add-scc-to-group")
    commands+=("add-scc-to-user")
    commands+=("reconcile-cluster-role-bindings")
    commands+=("reconcile-cluster-roles")
    commands+=("reconcile-sccs")
    commands+=("remove-cluster-role-from-group")
    commands+=("remove-cluster-role-from-user")
    commands+=("remove-group")
    commands+=("remove-role-from-group")
    commands+=("remove-role-from-user")
    commands+=("remove-scc-from-group")
    commands+=("remove-scc-from-user")
    commands+=("remove-user")
    commands+=("who-can")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_prune_builds()
{
    last_command="oc_adm_prune_builds"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--confirm")
    local_nonpersistent_flags+=("--confirm")
    flags+=("--keep-complete=")
    local_nonpersistent_flags+=("--keep-complete=")
    flags+=("--keep-failed=")
    local_nonpersistent_flags+=("--keep-failed=")
    flags+=("--keep-younger-than=")
    local_nonpersistent_flags+=("--keep-younger-than=")
    flags+=("--orphans")
    local_nonpersistent_flags+=("--orphans")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_prune_deployments()
{
    last_command="oc_adm_prune_deployments"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--confirm")
    local_nonpersistent_flags+=("--confirm")
    flags+=("--keep-complete=")
    local_nonpersistent_flags+=("--keep-complete=")
    flags+=("--keep-failed=")
    local_nonpersistent_flags+=("--keep-failed=")
    flags+=("--keep-younger-than=")
    local_nonpersistent_flags+=("--keep-younger-than=")
    flags+=("--orphans")
    local_nonpersistent_flags+=("--orphans")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_prune_groups()
{
    last_command="oc_adm_prune_groups"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--blacklist=")
    flags_with_completion+=("--blacklist")
    flags_completion+=("__handle_filename_extension_flag txt")
    local_nonpersistent_flags+=("--blacklist=")
    flags+=("--confirm")
    local_nonpersistent_flags+=("--confirm")
    flags+=("--sync-config=")
    flags_with_completion+=("--sync-config")
    flags_completion+=("__handle_filename_extension_flag yaml|yml")
    local_nonpersistent_flags+=("--sync-config=")
    flags+=("--whitelist=")
    flags_with_completion+=("--whitelist")
    flags_completion+=("__handle_filename_extension_flag txt")
    local_nonpersistent_flags+=("--whitelist=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_prune_images()
{
    last_command="oc_adm_prune_images"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--certificate-authority=")
    local_nonpersistent_flags+=("--certificate-authority=")
    flags+=("--confirm")
    local_nonpersistent_flags+=("--confirm")
    flags+=("--keep-tag-revisions=")
    local_nonpersistent_flags+=("--keep-tag-revisions=")
    flags+=("--keep-younger-than=")
    local_nonpersistent_flags+=("--keep-younger-than=")
    flags+=("--prune-over-size-limit")
    local_nonpersistent_flags+=("--prune-over-size-limit")
    flags+=("--registry-url=")
    local_nonpersistent_flags+=("--registry-url=")
    flags+=("--as=")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_prune()
{
    last_command="oc_adm_prune"
    commands=()
    commands+=("builds")
    commands+=("deployments")
    commands+=("groups")
    commands+=("images")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_registry()
{
    last_command="oc_adm_registry"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--create")
    local_nonpersistent_flags+=("--create")
    flags+=("--daemonset")
    local_nonpersistent_flags+=("--daemonset")
    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--enforce-quota")
    local_nonpersistent_flags+=("--enforce-quota")
    flags+=("--images=")
    local_nonpersistent_flags+=("--images=")
    flags+=("--labels=")
    local_nonpersistent_flags+=("--labels=")
    flags+=("--latest-images")
    local_nonpersistent_flags+=("--latest-images")
    flags+=("--mount-host=")
    local_nonpersistent_flags+=("--mount-host=")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--ports=")
    local_nonpersistent_flags+=("--ports=")
    flags+=("--replicas=")
    local_nonpersistent_flags+=("--replicas=")
    flags+=("--selector=")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--service-account=")
    local_nonpersistent_flags+=("--service-account=")
    flags+=("--tls-certificate=")
    local_nonpersistent_flags+=("--tls-certificate=")
    flags+=("--tls-key=")
    local_nonpersistent_flags+=("--tls-key=")
    flags+=("--type=")
    local_nonpersistent_flags+=("--type=")
    flags+=("--volume=")
    local_nonpersistent_flags+=("--volume=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_router()
{
    last_command="oc_adm_router"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--create")
    local_nonpersistent_flags+=("--create")
    flags+=("--default-cert=")
    local_nonpersistent_flags+=("--default-cert=")
    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--expose-metrics")
    local_nonpersistent_flags+=("--expose-metrics")
    flags+=("--external-host=")
    local_nonpersistent_flags+=("--external-host=")
    flags+=("--external-host-http-vserver=")
    local_nonpersistent_flags+=("--external-host-http-vserver=")
    flags+=("--external-host-https-vserver=")
    local_nonpersistent_flags+=("--external-host-https-vserver=")
    flags+=("--external-host-insecure")
    local_nonpersistent_flags+=("--external-host-insecure")
    flags+=("--external-host-partition-path=")
    local_nonpersistent_flags+=("--external-host-partition-path=")
    flags+=("--external-host-password=")
    local_nonpersistent_flags+=("--external-host-password=")
    flags+=("--external-host-private-key=")
    local_nonpersistent_flags+=("--external-host-private-key=")
    flags+=("--external-host-username=")
    local_nonpersistent_flags+=("--external-host-username=")
    flags+=("--force-subdomain=")
    local_nonpersistent_flags+=("--force-subdomain=")
    flags+=("--host-network")
    local_nonpersistent_flags+=("--host-network")
    flags+=("--host-ports")
    local_nonpersistent_flags+=("--host-ports")
    flags+=("--images=")
    local_nonpersistent_flags+=("--images=")
    flags+=("--labels=")
    local_nonpersistent_flags+=("--labels=")
    flags+=("--latest-images")
    local_nonpersistent_flags+=("--latest-images")
    flags+=("--metrics-image=")
    local_nonpersistent_flags+=("--metrics-image=")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--ports=")
    local_nonpersistent_flags+=("--ports=")
    flags+=("--replicas=")
    local_nonpersistent_flags+=("--replicas=")
    flags+=("--secrets-as-env")
    local_nonpersistent_flags+=("--secrets-as-env")
    flags+=("--selector=")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--service-account=")
    local_nonpersistent_flags+=("--service-account=")
    flags+=("--stats-password=")
    local_nonpersistent_flags+=("--stats-password=")
    flags+=("--stats-port=")
    local_nonpersistent_flags+=("--stats-port=")
    flags+=("--stats-user=")
    local_nonpersistent_flags+=("--stats-user=")
    flags+=("--subdomain=")
    local_nonpersistent_flags+=("--subdomain=")
    flags+=("--type=")
    local_nonpersistent_flags+=("--type=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_taint()
{
    last_command="oc_adm_taint"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all")
    local_nonpersistent_flags+=("--all")
    flags+=("--include-extended-apis")
    local_nonpersistent_flags+=("--include-extended-apis")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--overwrite")
    local_nonpersistent_flags+=("--overwrite")
    flags+=("--schema-cache-dir=")
    flags_with_completion+=("--schema-cache-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--schema-cache-dir=")
    flags+=("--selector=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--validate")
    local_nonpersistent_flags+=("--validate")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    must_have_one_noun+=("node")
    noun_aliases=()
    noun_aliases+=("no")
    noun_aliases+=("nodes")
}

_oc_adm_top_images()
{
    last_command="oc_adm_top_images"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_top_imagestreams()
{
    last_command="oc_adm_top_imagestreams"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_top_node()
{
    last_command="oc_adm_top_node"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--selector=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_top_pod()
{
    last_command="oc_adm_top_pod"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all-namespaces")
    local_nonpersistent_flags+=("--all-namespaces")
    flags+=("--containers")
    local_nonpersistent_flags+=("--containers")
    flags+=("--selector=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_top()
{
    last_command="oc_adm_top"
    commands=()
    commands+=("images")
    commands+=("imagestreams")
    commands+=("node")
    commands+=("pod")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm_uncordon()
{
    last_command="oc_adm_uncordon"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_adm()
{
    last_command="oc_adm"
    commands=()
    commands+=("build-chain")
    commands+=("ca")
    commands+=("completion")
    commands+=("config")
    commands+=("cordon")
    commands+=("create-api-client-config")
    commands+=("create-bootstrap-policy-file")
    commands+=("create-bootstrap-project-template")
    commands+=("create-error-template")
    commands+=("create-kubeconfig")
    commands+=("create-login-template")
    commands+=("create-node-config")
    commands+=("create-provider-selection-template")
    commands+=("diagnostics")
    commands+=("drain")
    commands+=("groups")
    commands+=("ipfailover")
    commands+=("manage-node")
    commands+=("migrate")
    commands+=("new-project")
    commands+=("options")
    commands+=("overwrite-policy")
    commands+=("pod-network")
    commands+=("policy")
    commands+=("prune")
    commands+=("registry")
    commands+=("router")
    commands+=("taint")
    commands+=("top")
    commands+=("uncordon")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_annotate()
{
    last_command="oc_annotate"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all")
    local_nonpersistent_flags+=("--all")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--include-extended-apis")
    local_nonpersistent_flags+=("--include-extended-apis")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--overwrite")
    local_nonpersistent_flags+=("--overwrite")
    flags+=("--record")
    local_nonpersistent_flags+=("--record")
    flags+=("--recursive")
    flags+=("-R")
    local_nonpersistent_flags+=("--recursive")
    flags+=("--resource-version=")
    local_nonpersistent_flags+=("--resource-version=")
    flags+=("--selector=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    must_have_one_noun+=("appliedclusterresourcequota")
    must_have_one_noun+=("build")
    must_have_one_noun+=("buildconfig")
    must_have_one_noun+=("certificatesigningrequest")
    must_have_one_noun+=("cluster")
    must_have_one_noun+=("clusternetwork")
    must_have_one_noun+=("clusterpolicy")
    must_have_one_noun+=("clusterpolicybinding")
    must_have_one_noun+=("clusterresourcequota")
    must_have_one_noun+=("clusterrole")
    must_have_one_noun+=("clusterrole")
    must_have_one_noun+=("clusterrolebinding")
    must_have_one_noun+=("clusterrolebinding")
    must_have_one_noun+=("componentstatus")
    must_have_one_noun+=("configmap")
    must_have_one_noun+=("daemonset")
    must_have_one_noun+=("deployment")
    must_have_one_noun+=("deploymentconfig")
    must_have_one_noun+=("egressnetworkpolicy")
    must_have_one_noun+=("endpoints")
    must_have_one_noun+=("event")
    must_have_one_noun+=("group")
    must_have_one_noun+=("horizontalpodautoscaler")
    must_have_one_noun+=("hostsubnet")
    must_have_one_noun+=("identity")
    must_have_one_noun+=("image")
    must_have_one_noun+=("imagestream")
    must_have_one_noun+=("imagestreamimage")
    must_have_one_noun+=("imagestreamtag")
    must_have_one_noun+=("ingress")
    must_have_one_noun+=("ispersonalsubjectaccessreview")
    must_have_one_noun+=("job")
    must_have_one_noun+=("limitrange")
    must_have_one_noun+=("namespace")
    must_have_one_noun+=("netnamespace")
    must_have_one_noun+=("networkpolicy")
    must_have_one_noun+=("node")
    must_have_one_noun+=("oauthaccesstoken")
    must_have_one_noun+=("oauthauthorizetoken")
    must_have_one_noun+=("oauthclient")
    must_have_one_noun+=("oauthclientauthorization")
    must_have_one_noun+=("persistentvolume")
    must_have_one_noun+=("persistentvolumeclaim")
    must_have_one_noun+=("petset")
    must_have_one_noun+=("pod")
    must_have_one_noun+=("podsecuritypolicy")
    must_have_one_noun+=("podtemplate")
    must_have_one_noun+=("policy")
    must_have_one_noun+=("policybinding")
    must_have_one_noun+=("project")
    must_have_one_noun+=("replicaset")
    must_have_one_noun+=("replicationcontroller")
    must_have_one_noun+=("resourcequota")
    must_have_one_noun+=("role")
    must_have_one_noun+=("role")
    must_have_one_noun+=("rolebinding")
    must_have_one_noun+=("rolebinding")
    must_have_one_noun+=("route")
    must_have_one_noun+=("scheduledjob")
    must_have_one_noun+=("secret")
    must_have_one_noun+=("securitycontextconstraints")
    must_have_one_noun+=("service")
    must_have_one_noun+=("serviceaccount")
    must_have_one_noun+=("storageclass")
    must_have_one_noun+=("template")
    must_have_one_noun+=("thirdpartyresource")
    must_have_one_noun+=("thirdpartyresourcedata")
    must_have_one_noun+=("user")
    must_have_one_noun+=("useridentitymapping")
    noun_aliases=()
    noun_aliases+=("appliedclusterresourcequotas")
    noun_aliases+=("buildconfigs")
    noun_aliases+=("builds")
    noun_aliases+=("certificatesigningrequests")
    noun_aliases+=("clusternetworks")
    noun_aliases+=("clusterpolicies")
    noun_aliases+=("clusterpolicybindings")
    noun_aliases+=("clusterresourcequotas")
    noun_aliases+=("clusterrolebindings")
    noun_aliases+=("clusterrolebindings")
    noun_aliases+=("clusterroles")
    noun_aliases+=("clusterroles")
    noun_aliases+=("clusters")
    noun_aliases+=("cm")
    noun_aliases+=("componentstatuses")
    noun_aliases+=("configmaps")
    noun_aliases+=("cs")
    noun_aliases+=("csr")
    noun_aliases+=("daemonsets")
    noun_aliases+=("deploy")
    noun_aliases+=("deploymentconfigs")
    noun_aliases+=("deployments")
    noun_aliases+=("ds")
    noun_aliases+=("egressnetworkpolicies")
    noun_aliases+=("endpoints")
    noun_aliases+=("ep")
    noun_aliases+=("ev")
    noun_aliases+=("events")
    noun_aliases+=("groups")
    noun_aliases+=("horizontalpodautoscalers")
    noun_aliases+=("hostsubnets")
    noun_aliases+=("hpa")
    noun_aliases+=("identities")
    noun_aliases+=("images")
    noun_aliases+=("imagestreamimages")
    noun_aliases+=("imagestreams")
    noun_aliases+=("imagestreamtags")
    noun_aliases+=("ing")
    noun_aliases+=("ingresses")
    noun_aliases+=("ispersonalsubjectaccessreviews")
    noun_aliases+=("jobs")
    noun_aliases+=("limitranges")
    noun_aliases+=("limits")
    noun_aliases+=("namespaces")
    noun_aliases+=("netnamespaces")
    noun_aliases+=("networkpolicies")
    noun_aliases+=("no")
    noun_aliases+=("nodes")
    noun_aliases+=("ns")
    noun_aliases+=("oauthaccesstokens")
    noun_aliases+=("oauthauthorizetokens")
    noun_aliases+=("oauthclientauthorizations")
    noun_aliases+=("oauthclients")
    noun_aliases+=("persistentvolumeclaims")
    noun_aliases+=("persistentvolumes")
    noun_aliases+=("petsets")
    noun_aliases+=("po")
    noun_aliases+=("pods")
    noun_aliases+=("podsecuritypolicies")
    noun_aliases+=("podtemplates")
    noun_aliases+=("policies")
    noun_aliases+=("policybindings")
    noun_aliases+=("projects")
    noun_aliases+=("pv")
    noun_aliases+=("pvc")
    noun_aliases+=("quota")
    noun_aliases+=("rc")
    noun_aliases+=("replicasets")
    noun_aliases+=("replicationcontrollers")
    noun_aliases+=("resourcequotas")
    noun_aliases+=("rolebindings")
    noun_aliases+=("rolebindings")
    noun_aliases+=("roles")
    noun_aliases+=("roles")
    noun_aliases+=("routes")
    noun_aliases+=("rs")
    noun_aliases+=("sa")
    noun_aliases+=("scheduledjobs")
    noun_aliases+=("secrets")
    noun_aliases+=("securitycontextconstraintses")
    noun_aliases+=("serviceaccounts")
    noun_aliases+=("services")
    noun_aliases+=("storageclasses")
    noun_aliases+=("svc")
    noun_aliases+=("templates")
    noun_aliases+=("thirdpartyresourcedatas")
    noun_aliases+=("thirdpartyresources")
    noun_aliases+=("useridentitymappings")
    noun_aliases+=("users")
}

_oc_apply()
{
    last_command="oc_apply"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--include-extended-apis")
    local_nonpersistent_flags+=("--include-extended-apis")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--overwrite")
    local_nonpersistent_flags+=("--overwrite")
    flags+=("--record")
    local_nonpersistent_flags+=("--record")
    flags+=("--recursive")
    flags+=("-R")
    local_nonpersistent_flags+=("--recursive")
    flags+=("--schema-cache-dir=")
    flags_with_completion+=("--schema-cache-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--schema-cache-dir=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--validate")
    local_nonpersistent_flags+=("--validate")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_flag+=("--filename=")
    must_have_one_flag+=("-f")
    must_have_one_noun=()
    noun_aliases=()
}

_oc_attach()
{
    last_command="oc_attach"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--container=")
    two_word_flags+=("-c")
    local_nonpersistent_flags+=("--container=")
    flags+=("--stdin")
    flags+=("-i")
    local_nonpersistent_flags+=("--stdin")
    flags+=("--tty")
    flags+=("-t")
    local_nonpersistent_flags+=("--tty")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_autoscale()
{
    last_command="oc_autoscale"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--cpu-percent=")
    local_nonpersistent_flags+=("--cpu-percent=")
    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--generator=")
    local_nonpersistent_flags+=("--generator=")
    flags+=("--include-extended-apis")
    local_nonpersistent_flags+=("--include-extended-apis")
    flags+=("--max=")
    local_nonpersistent_flags+=("--max=")
    flags+=("--min=")
    local_nonpersistent_flags+=("--min=")
    flags+=("--name=")
    local_nonpersistent_flags+=("--name=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--record")
    local_nonpersistent_flags+=("--record")
    flags+=("--recursive")
    flags+=("-R")
    local_nonpersistent_flags+=("--recursive")
    flags+=("--save-config")
    local_nonpersistent_flags+=("--save-config")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_flag+=("--max=")
    must_have_one_noun=()
    must_have_one_noun+=("deployment")
    must_have_one_noun+=("deploymentconfig")
    must_have_one_noun+=("replicaset")
    must_have_one_noun+=("replicationcontroller")
    noun_aliases=()
    noun_aliases+=("deploy")
    noun_aliases+=("deployments")
    noun_aliases+=("rc")
    noun_aliases+=("replicasets")
    noun_aliases+=("replicationcontrollers")
    noun_aliases+=("rs")
}

_oc_cancel-build()
{
    last_command="oc_cancel-build"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--dump-logs")
    local_nonpersistent_flags+=("--dump-logs")
    flags+=("--restart")
    local_nonpersistent_flags+=("--restart")
    flags+=("--state=")
    local_nonpersistent_flags+=("--state=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_cluster_down()
{
    last_command="oc_cluster_down"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--docker-machine=")
    local_nonpersistent_flags+=("--docker-machine=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_cluster_status()
{
    last_command="oc_cluster_status"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--docker-machine=")
    local_nonpersistent_flags+=("--docker-machine=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_cluster_up()
{
    last_command="oc_cluster_up"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--create-machine")
    local_nonpersistent_flags+=("--create-machine")
    flags+=("--docker-machine=")
    local_nonpersistent_flags+=("--docker-machine=")
    flags+=("--env=")
    two_word_flags+=("-e")
    local_nonpersistent_flags+=("--env=")
    flags+=("--forward-ports")
    local_nonpersistent_flags+=("--forward-ports")
    flags+=("--host-config-dir=")
    local_nonpersistent_flags+=("--host-config-dir=")
    flags+=("--host-data-dir=")
    local_nonpersistent_flags+=("--host-data-dir=")
    flags+=("--host-volumes-dir=")
    local_nonpersistent_flags+=("--host-volumes-dir=")
    flags+=("--image=")
    local_nonpersistent_flags+=("--image=")
    flags+=("--logging")
    local_nonpersistent_flags+=("--logging")
    flags+=("--metrics")
    local_nonpersistent_flags+=("--metrics")
    flags+=("--public-hostname=")
    local_nonpersistent_flags+=("--public-hostname=")
    flags+=("--routing-suffix=")
    local_nonpersistent_flags+=("--routing-suffix=")
    flags+=("--server-loglevel=")
    local_nonpersistent_flags+=("--server-loglevel=")
    flags+=("--skip-registry-check")
    local_nonpersistent_flags+=("--skip-registry-check")
    flags+=("--use-existing-config")
    local_nonpersistent_flags+=("--use-existing-config")
    flags+=("--version=")
    local_nonpersistent_flags+=("--version=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_cluster()
{
    last_command="oc_cluster"
    commands=()
    commands+=("down")
    commands+=("status")
    commands+=("up")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_completion()
{
    last_command="oc_completion"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    must_have_one_noun+=("bash")
    must_have_one_noun+=("zsh")
    noun_aliases=()
}

_oc_config_current-context()
{
    last_command="oc_config_current-context"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_config_delete-cluster()
{
    last_command="oc_config_delete-cluster"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_config_delete-context()
{
    last_command="oc_config_delete-context"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_config_get-clusters()
{
    last_command="oc_config_get-clusters"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_config_get-contexts()
{
    last_command="oc_config_get-contexts"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_config_set()
{
    last_command="oc_config_set"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--set-raw-bytes")
    local_nonpersistent_flags+=("--set-raw-bytes")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_config_set-cluster()
{
    last_command="oc_config_set-cluster"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--api-version=")
    local_nonpersistent_flags+=("--api-version=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--certificate-authority=")
    flags+=("--embed-certs")
    local_nonpersistent_flags+=("--embed-certs")
    flags+=("--insecure-skip-tls-verify")
    local_nonpersistent_flags+=("--insecure-skip-tls-verify")
    flags+=("--server=")
    local_nonpersistent_flags+=("--server=")
    flags+=("--as=")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_config_set-context()
{
    last_command="oc_config_set-context"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--cluster=")
    local_nonpersistent_flags+=("--cluster=")
    flags+=("--namespace=")
    local_nonpersistent_flags+=("--namespace=")
    flags+=("--user=")
    local_nonpersistent_flags+=("--user=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_config_set-credentials()
{
    last_command="oc_config_set-credentials"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--auth-provider=")
    local_nonpersistent_flags+=("--auth-provider=")
    flags+=("--auth-provider-arg=")
    local_nonpersistent_flags+=("--auth-provider-arg=")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--client-certificate=")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--client-key=")
    flags+=("--embed-certs")
    local_nonpersistent_flags+=("--embed-certs")
    flags+=("--password=")
    local_nonpersistent_flags+=("--password=")
    flags+=("--token=")
    local_nonpersistent_flags+=("--token=")
    flags+=("--username=")
    local_nonpersistent_flags+=("--username=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_config_unset()
{
    last_command="oc_config_unset"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_config_use-context()
{
    last_command="oc_config_use-context"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_config_view()
{
    last_command="oc_config_view"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--flatten")
    local_nonpersistent_flags+=("--flatten")
    flags+=("--merge")
    local_nonpersistent_flags+=("--merge")
    flags+=("--minify")
    local_nonpersistent_flags+=("--minify")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--raw")
    local_nonpersistent_flags+=("--raw")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_config()
{
    last_command="oc_config"
    commands=()
    commands+=("current-context")
    commands+=("delete-cluster")
    commands+=("delete-context")
    commands+=("get-clusters")
    commands+=("get-contexts")
    commands+=("set")
    commands+=("set-cluster")
    commands+=("set-context")
    commands+=("set-credentials")
    commands+=("unset")
    commands+=("use-context")
    commands+=("view")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--config=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_convert()
{
    last_command="oc_convert"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--include-extended-apis")
    local_nonpersistent_flags+=("--include-extended-apis")
    flags+=("--local")
    local_nonpersistent_flags+=("--local")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--recursive")
    flags+=("-R")
    local_nonpersistent_flags+=("--recursive")
    flags+=("--schema-cache-dir=")
    flags_with_completion+=("--schema-cache-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--schema-cache-dir=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--validate")
    local_nonpersistent_flags+=("--validate")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_flag+=("--filename=")
    must_have_one_flag+=("-f")
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_clusterresourcequota()
{
    last_command="oc_create_clusterresourcequota"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--hard=")
    local_nonpersistent_flags+=("--hard=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--project-annotation-selector=")
    local_nonpersistent_flags+=("--project-annotation-selector=")
    flags+=("--project-label-selector=")
    local_nonpersistent_flags+=("--project-label-selector=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_configmap()
{
    last_command="oc_create_configmap"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--from-file=")
    local_nonpersistent_flags+=("--from-file=")
    flags+=("--from-literal=")
    local_nonpersistent_flags+=("--from-literal=")
    flags+=("--generator=")
    local_nonpersistent_flags+=("--generator=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--save-config")
    local_nonpersistent_flags+=("--save-config")
    flags+=("--schema-cache-dir=")
    flags_with_completion+=("--schema-cache-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--schema-cache-dir=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--validate")
    local_nonpersistent_flags+=("--validate")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_deployment()
{
    last_command="oc_create_deployment"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--generator=")
    local_nonpersistent_flags+=("--generator=")
    flags+=("--image=")
    local_nonpersistent_flags+=("--image=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--save-config")
    local_nonpersistent_flags+=("--save-config")
    flags+=("--schema-cache-dir=")
    flags_with_completion+=("--schema-cache-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--schema-cache-dir=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--validate")
    local_nonpersistent_flags+=("--validate")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_flag+=("--image=")
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_deploymentconfig()
{
    last_command="oc_create_deploymentconfig"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--image=")
    local_nonpersistent_flags+=("--image=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_flag+=("--image=")
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_identity()
{
    last_command="oc_create_identity"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_imagestream()
{
    last_command="oc_create_imagestream"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_namespace()
{
    last_command="oc_create_namespace"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--generator=")
    local_nonpersistent_flags+=("--generator=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--save-config")
    local_nonpersistent_flags+=("--save-config")
    flags+=("--schema-cache-dir=")
    flags_with_completion+=("--schema-cache-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--schema-cache-dir=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--validate")
    local_nonpersistent_flags+=("--validate")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_policybinding()
{
    last_command="oc_create_policybinding"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_quota()
{
    last_command="oc_create_quota"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--generator=")
    local_nonpersistent_flags+=("--generator=")
    flags+=("--hard=")
    local_nonpersistent_flags+=("--hard=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--save-config")
    local_nonpersistent_flags+=("--save-config")
    flags+=("--schema-cache-dir=")
    flags_with_completion+=("--schema-cache-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--schema-cache-dir=")
    flags+=("--scopes=")
    local_nonpersistent_flags+=("--scopes=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--validate")
    local_nonpersistent_flags+=("--validate")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_route_edge()
{
    last_command="oc_create_route_edge"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--ca-cert=")
    flags_with_completion+=("--ca-cert")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--ca-cert=")
    flags+=("--cert=")
    flags_with_completion+=("--cert")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--cert=")
    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--hostname=")
    local_nonpersistent_flags+=("--hostname=")
    flags+=("--insecure-policy=")
    local_nonpersistent_flags+=("--insecure-policy=")
    flags+=("--key=")
    flags_with_completion+=("--key")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--key=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--path=")
    local_nonpersistent_flags+=("--path=")
    flags+=("--port=")
    local_nonpersistent_flags+=("--port=")
    flags+=("--schema-cache-dir=")
    flags_with_completion+=("--schema-cache-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--schema-cache-dir=")
    flags+=("--service=")
    local_nonpersistent_flags+=("--service=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--validate")
    local_nonpersistent_flags+=("--validate")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_flag+=("--service=")
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_route_passthrough()
{
    last_command="oc_create_route_passthrough"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--hostname=")
    local_nonpersistent_flags+=("--hostname=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--port=")
    local_nonpersistent_flags+=("--port=")
    flags+=("--schema-cache-dir=")
    flags_with_completion+=("--schema-cache-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--schema-cache-dir=")
    flags+=("--service=")
    local_nonpersistent_flags+=("--service=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--validate")
    local_nonpersistent_flags+=("--validate")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_flag+=("--service=")
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_route_reencrypt()
{
    last_command="oc_create_route_reencrypt"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--ca-cert=")
    flags_with_completion+=("--ca-cert")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--ca-cert=")
    flags+=("--cert=")
    flags_with_completion+=("--cert")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--cert=")
    flags+=("--dest-ca-cert=")
    flags_with_completion+=("--dest-ca-cert")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--dest-ca-cert=")
    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--hostname=")
    local_nonpersistent_flags+=("--hostname=")
    flags+=("--key=")
    flags_with_completion+=("--key")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--key=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--path=")
    local_nonpersistent_flags+=("--path=")
    flags+=("--port=")
    local_nonpersistent_flags+=("--port=")
    flags+=("--schema-cache-dir=")
    flags_with_completion+=("--schema-cache-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--schema-cache-dir=")
    flags+=("--service=")
    local_nonpersistent_flags+=("--service=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--validate")
    local_nonpersistent_flags+=("--validate")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_flag+=("--dest-ca-cert=")
    must_have_one_flag+=("--service=")
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_route()
{
    last_command="oc_create_route"
    commands=()
    commands+=("edge")
    commands+=("passthrough")
    commands+=("reencrypt")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_secret_docker-registry()
{
    last_command="oc_create_secret_docker-registry"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--docker-email=")
    local_nonpersistent_flags+=("--docker-email=")
    flags+=("--docker-password=")
    local_nonpersistent_flags+=("--docker-password=")
    flags+=("--docker-server=")
    local_nonpersistent_flags+=("--docker-server=")
    flags+=("--docker-username=")
    local_nonpersistent_flags+=("--docker-username=")
    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--generator=")
    local_nonpersistent_flags+=("--generator=")
    flags+=("--include-extended-apis")
    local_nonpersistent_flags+=("--include-extended-apis")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--save-config")
    local_nonpersistent_flags+=("--save-config")
    flags+=("--schema-cache-dir=")
    flags_with_completion+=("--schema-cache-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--schema-cache-dir=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--validate")
    local_nonpersistent_flags+=("--validate")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_flag+=("--docker-email=")
    must_have_one_flag+=("--docker-password=")
    must_have_one_flag+=("--docker-username=")
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_secret_generic()
{
    last_command="oc_create_secret_generic"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--from-file=")
    local_nonpersistent_flags+=("--from-file=")
    flags+=("--from-literal=")
    local_nonpersistent_flags+=("--from-literal=")
    flags+=("--generator=")
    local_nonpersistent_flags+=("--generator=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--save-config")
    local_nonpersistent_flags+=("--save-config")
    flags+=("--schema-cache-dir=")
    flags_with_completion+=("--schema-cache-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--schema-cache-dir=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--type=")
    local_nonpersistent_flags+=("--type=")
    flags+=("--validate")
    local_nonpersistent_flags+=("--validate")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_secret_tls()
{
    last_command="oc_create_secret_tls"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--cert=")
    local_nonpersistent_flags+=("--cert=")
    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--generator=")
    local_nonpersistent_flags+=("--generator=")
    flags+=("--key=")
    local_nonpersistent_flags+=("--key=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--save-config")
    local_nonpersistent_flags+=("--save-config")
    flags+=("--schema-cache-dir=")
    flags_with_completion+=("--schema-cache-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--schema-cache-dir=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--validate")
    local_nonpersistent_flags+=("--validate")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_secret()
{
    last_command="oc_create_secret"
    commands=()
    commands+=("docker-registry")
    commands+=("generic")
    commands+=("tls")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_service_clusterip()
{
    last_command="oc_create_service_clusterip"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--clusterip=")
    local_nonpersistent_flags+=("--clusterip=")
    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--generator=")
    local_nonpersistent_flags+=("--generator=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--save-config")
    local_nonpersistent_flags+=("--save-config")
    flags+=("--schema-cache-dir=")
    flags_with_completion+=("--schema-cache-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--schema-cache-dir=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--tcp=")
    local_nonpersistent_flags+=("--tcp=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--validate")
    local_nonpersistent_flags+=("--validate")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_service_loadbalancer()
{
    last_command="oc_create_service_loadbalancer"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--generator=")
    local_nonpersistent_flags+=("--generator=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--save-config")
    local_nonpersistent_flags+=("--save-config")
    flags+=("--schema-cache-dir=")
    flags_with_completion+=("--schema-cache-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--schema-cache-dir=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--tcp=")
    local_nonpersistent_flags+=("--tcp=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--validate")
    local_nonpersistent_flags+=("--validate")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_service_nodeport()
{
    last_command="oc_create_service_nodeport"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--generator=")
    local_nonpersistent_flags+=("--generator=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--node-port=")
    local_nonpersistent_flags+=("--node-port=")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--save-config")
    local_nonpersistent_flags+=("--save-config")
    flags+=("--schema-cache-dir=")
    flags_with_completion+=("--schema-cache-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--schema-cache-dir=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--tcp=")
    local_nonpersistent_flags+=("--tcp=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--validate")
    local_nonpersistent_flags+=("--validate")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_service()
{
    last_command="oc_create_service"
    commands=()
    commands+=("clusterip")
    commands+=("loadbalancer")
    commands+=("nodeport")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_serviceaccount()
{
    last_command="oc_create_serviceaccount"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--generator=")
    local_nonpersistent_flags+=("--generator=")
    flags+=("--include-extended-apis")
    local_nonpersistent_flags+=("--include-extended-apis")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--save-config")
    local_nonpersistent_flags+=("--save-config")
    flags+=("--schema-cache-dir=")
    flags_with_completion+=("--schema-cache-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--schema-cache-dir=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--validate")
    local_nonpersistent_flags+=("--validate")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_user()
{
    last_command="oc_create_user"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--full-name=")
    local_nonpersistent_flags+=("--full-name=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create_useridentitymapping()
{
    last_command="oc_create_useridentitymapping"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_create()
{
    last_command="oc_create"
    commands=()
    commands+=("clusterresourcequota")
    commands+=("configmap")
    commands+=("deployment")
    commands+=("deploymentconfig")
    commands+=("identity")
    commands+=("imagestream")
    commands+=("namespace")
    commands+=("policybinding")
    commands+=("quota")
    commands+=("route")
    commands+=("secret")
    commands+=("service")
    commands+=("serviceaccount")
    commands+=("user")
    commands+=("useridentitymapping")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--include-extended-apis")
    local_nonpersistent_flags+=("--include-extended-apis")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--record")
    local_nonpersistent_flags+=("--record")
    flags+=("--recursive")
    flags+=("-R")
    local_nonpersistent_flags+=("--recursive")
    flags+=("--save-config")
    local_nonpersistent_flags+=("--save-config")
    flags+=("--schema-cache-dir=")
    flags_with_completion+=("--schema-cache-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--schema-cache-dir=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--validate")
    local_nonpersistent_flags+=("--validate")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_flag+=("--filename=")
    must_have_one_flag+=("-f")
    must_have_one_noun=()
    noun_aliases=()
}

_oc_debug()
{
    last_command="oc_debug"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as-root")
    local_nonpersistent_flags+=("--as-root")
    flags+=("--as-user=")
    local_nonpersistent_flags+=("--as-user=")
    flags+=("--container=")
    two_word_flags+=("-c")
    local_nonpersistent_flags+=("--container=")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--keep-annotations")
    local_nonpersistent_flags+=("--keep-annotations")
    flags+=("--keep-init-containers")
    local_nonpersistent_flags+=("--keep-init-containers")
    flags+=("--keep-liveness")
    local_nonpersistent_flags+=("--keep-liveness")
    flags+=("--keep-readiness")
    local_nonpersistent_flags+=("--keep-readiness")
    flags+=("--no-stdin")
    flags+=("-I")
    local_nonpersistent_flags+=("--no-stdin")
    flags+=("--no-tty")
    flags+=("-T")
    local_nonpersistent_flags+=("--no-tty")
    flags+=("--node-name=")
    local_nonpersistent_flags+=("--node-name=")
    flags+=("--one-container")
    local_nonpersistent_flags+=("--one-container")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--tty")
    flags+=("-t")
    local_nonpersistent_flags+=("--tty")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_delete()
{
    last_command="oc_delete"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all")
    local_nonpersistent_flags+=("--all")
    flags+=("--cascade")
    local_nonpersistent_flags+=("--cascade")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--grace-period=")
    local_nonpersistent_flags+=("--grace-period=")
    flags+=("--ignore-not-found")
    local_nonpersistent_flags+=("--ignore-not-found")
    flags+=("--include-extended-apis")
    local_nonpersistent_flags+=("--include-extended-apis")
    flags+=("--now")
    local_nonpersistent_flags+=("--now")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--recursive")
    flags+=("-R")
    local_nonpersistent_flags+=("--recursive")
    flags+=("--selector=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--timeout=")
    local_nonpersistent_flags+=("--timeout=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    must_have_one_noun+=("appliedclusterresourcequota")
    must_have_one_noun+=("build")
    must_have_one_noun+=("buildconfig")
    must_have_one_noun+=("certificatesigningrequest")
    must_have_one_noun+=("cluster")
    must_have_one_noun+=("clusternetwork")
    must_have_one_noun+=("clusterpolicy")
    must_have_one_noun+=("clusterpolicybinding")
    must_have_one_noun+=("clusterresourcequota")
    must_have_one_noun+=("clusterrole")
    must_have_one_noun+=("clusterrole")
    must_have_one_noun+=("clusterrolebinding")
    must_have_one_noun+=("clusterrolebinding")
    must_have_one_noun+=("componentstatus")
    must_have_one_noun+=("configmap")
    must_have_one_noun+=("daemonset")
    must_have_one_noun+=("deployment")
    must_have_one_noun+=("deploymentconfig")
    must_have_one_noun+=("egressnetworkpolicy")
    must_have_one_noun+=("endpoints")
    must_have_one_noun+=("event")
    must_have_one_noun+=("group")
    must_have_one_noun+=("horizontalpodautoscaler")
    must_have_one_noun+=("hostsubnet")
    must_have_one_noun+=("identity")
    must_have_one_noun+=("image")
    must_have_one_noun+=("imagestream")
    must_have_one_noun+=("imagestreamimage")
    must_have_one_noun+=("imagestreamtag")
    must_have_one_noun+=("ingress")
    must_have_one_noun+=("ispersonalsubjectaccessreview")
    must_have_one_noun+=("job")
    must_have_one_noun+=("limitrange")
    must_have_one_noun+=("namespace")
    must_have_one_noun+=("netnamespace")
    must_have_one_noun+=("networkpolicy")
    must_have_one_noun+=("node")
    must_have_one_noun+=("oauthaccesstoken")
    must_have_one_noun+=("oauthauthorizetoken")
    must_have_one_noun+=("oauthclient")
    must_have_one_noun+=("oauthclientauthorization")
    must_have_one_noun+=("persistentvolume")
    must_have_one_noun+=("persistentvolumeclaim")
    must_have_one_noun+=("petset")
    must_have_one_noun+=("pod")
    must_have_one_noun+=("podsecuritypolicy")
    must_have_one_noun+=("podtemplate")
    must_have_one_noun+=("policy")
    must_have_one_noun+=("policybinding")
    must_have_one_noun+=("project")
    must_have_one_noun+=("replicaset")
    must_have_one_noun+=("replicationcontroller")
    must_have_one_noun+=("resourcequota")
    must_have_one_noun+=("role")
    must_have_one_noun+=("role")
    must_have_one_noun+=("rolebinding")
    must_have_one_noun+=("rolebinding")
    must_have_one_noun+=("route")
    must_have_one_noun+=("scheduledjob")
    must_have_one_noun+=("secret")
    must_have_one_noun+=("securitycontextconstraints")
    must_have_one_noun+=("service")
    must_have_one_noun+=("serviceaccount")
    must_have_one_noun+=("storageclass")
    must_have_one_noun+=("template")
    must_have_one_noun+=("thirdpartyresource")
    must_have_one_noun+=("thirdpartyresourcedata")
    must_have_one_noun+=("user")
    must_have_one_noun+=("useridentitymapping")
    noun_aliases=()
    noun_aliases+=("appliedclusterresourcequotas")
    noun_aliases+=("buildconfigs")
    noun_aliases+=("builds")
    noun_aliases+=("certificatesigningrequests")
    noun_aliases+=("clusternetworks")
    noun_aliases+=("clusterpolicies")
    noun_aliases+=("clusterpolicybindings")
    noun_aliases+=("clusterresourcequotas")
    noun_aliases+=("clusterrolebindings")
    noun_aliases+=("clusterrolebindings")
    noun_aliases+=("clusterroles")
    noun_aliases+=("clusterroles")
    noun_aliases+=("clusters")
    noun_aliases+=("cm")
    noun_aliases+=("componentstatuses")
    noun_aliases+=("configmaps")
    noun_aliases+=("cs")
    noun_aliases+=("csr")
    noun_aliases+=("daemonsets")
    noun_aliases+=("deploy")
    noun_aliases+=("deploymentconfigs")
    noun_aliases+=("deployments")
    noun_aliases+=("ds")
    noun_aliases+=("egressnetworkpolicies")
    noun_aliases+=("endpoints")
    noun_aliases+=("ep")
    noun_aliases+=("ev")
    noun_aliases+=("events")
    noun_aliases+=("groups")
    noun_aliases+=("horizontalpodautoscalers")
    noun_aliases+=("hostsubnets")
    noun_aliases+=("hpa")
    noun_aliases+=("identities")
    noun_aliases+=("images")
    noun_aliases+=("imagestreamimages")
    noun_aliases+=("imagestreams")
    noun_aliases+=("imagestreamtags")
    noun_aliases+=("ing")
    noun_aliases+=("ingresses")
    noun_aliases+=("ispersonalsubjectaccessreviews")
    noun_aliases+=("jobs")
    noun_aliases+=("limitranges")
    noun_aliases+=("limits")
    noun_aliases+=("namespaces")
    noun_aliases+=("netnamespaces")
    noun_aliases+=("networkpolicies")
    noun_aliases+=("no")
    noun_aliases+=("nodes")
    noun_aliases+=("ns")
    noun_aliases+=("oauthaccesstokens")
    noun_aliases+=("oauthauthorizetokens")
    noun_aliases+=("oauthclientauthorizations")
    noun_aliases+=("oauthclients")
    noun_aliases+=("persistentvolumeclaims")
    noun_aliases+=("persistentvolumes")
    noun_aliases+=("petsets")
    noun_aliases+=("po")
    noun_aliases+=("pods")
    noun_aliases+=("podsecuritypolicies")
    noun_aliases+=("podtemplates")
    noun_aliases+=("policies")
    noun_aliases+=("policybindings")
    noun_aliases+=("projects")
    noun_aliases+=("pv")
    noun_aliases+=("pvc")
    noun_aliases+=("quota")
    noun_aliases+=("rc")
    noun_aliases+=("replicasets")
    noun_aliases+=("replicationcontrollers")
    noun_aliases+=("resourcequotas")
    noun_aliases+=("rolebindings")
    noun_aliases+=("rolebindings")
    noun_aliases+=("roles")
    noun_aliases+=("roles")
    noun_aliases+=("routes")
    noun_aliases+=("rs")
    noun_aliases+=("sa")
    noun_aliases+=("scheduledjobs")
    noun_aliases+=("secrets")
    noun_aliases+=("securitycontextconstraintses")
    noun_aliases+=("serviceaccounts")
    noun_aliases+=("services")
    noun_aliases+=("storageclasses")
    noun_aliases+=("svc")
    noun_aliases+=("templates")
    noun_aliases+=("thirdpartyresourcedatas")
    noun_aliases+=("thirdpartyresources")
    noun_aliases+=("useridentitymappings")
    noun_aliases+=("users")
}

_oc_deploy()
{
    last_command="oc_deploy"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--cancel")
    local_nonpersistent_flags+=("--cancel")
    flags+=("--enable-triggers")
    local_nonpersistent_flags+=("--enable-triggers")
    flags+=("--follow")
    local_nonpersistent_flags+=("--follow")
    flags+=("--retry")
    local_nonpersistent_flags+=("--retry")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_describe()
{
    last_command="oc_describe"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all-namespaces")
    local_nonpersistent_flags+=("--all-namespaces")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--include-extended-apis")
    local_nonpersistent_flags+=("--include-extended-apis")
    flags+=("--recursive")
    flags+=("-R")
    local_nonpersistent_flags+=("--recursive")
    flags+=("--selector=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--show-events")
    local_nonpersistent_flags+=("--show-events")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    must_have_one_noun+=("appliedclusterresourcequota")
    must_have_one_noun+=("build")
    must_have_one_noun+=("buildconfig")
    must_have_one_noun+=("certificatesigningrequest")
    must_have_one_noun+=("clusternetwork")
    must_have_one_noun+=("clusterpolicy")
    must_have_one_noun+=("clusterpolicybinding")
    must_have_one_noun+=("clusterresourcequota")
    must_have_one_noun+=("clusterrole")
    must_have_one_noun+=("clusterrolebinding")
    must_have_one_noun+=("configmap")
    must_have_one_noun+=("daemonset")
    must_have_one_noun+=("deployment")
    must_have_one_noun+=("deploymentconfig")
    must_have_one_noun+=("egressnetworkpolicy")
    must_have_one_noun+=("endpoints")
    must_have_one_noun+=("group")
    must_have_one_noun+=("horizontalpodautoscaler")
    must_have_one_noun+=("horizontalpodautoscaler")
    must_have_one_noun+=("hostsubnet")
    must_have_one_noun+=("identity")
    must_have_one_noun+=("image")
    must_have_one_noun+=("imagestream")
    must_have_one_noun+=("imagestreamimage")
    must_have_one_noun+=("imagestreamtag")
    must_have_one_noun+=("ingress")
    must_have_one_noun+=("job")
    must_have_one_noun+=("job")
    must_have_one_noun+=("limitrange")
    must_have_one_noun+=("namespace")
    must_have_one_noun+=("netnamespace")
    must_have_one_noun+=("networkpolicy")
    must_have_one_noun+=("node")
    must_have_one_noun+=("oauthaccesstoken")
    must_have_one_noun+=("persistentvolume")
    must_have_one_noun+=("persistentvolumeclaim")
    must_have_one_noun+=("petset")
    must_have_one_noun+=("pod")
    must_have_one_noun+=("policy")
    must_have_one_noun+=("policybinding")
    must_have_one_noun+=("project")
    must_have_one_noun+=("replicaset")
    must_have_one_noun+=("replicationcontroller")
    must_have_one_noun+=("resourcequota")
    must_have_one_noun+=("role")
    must_have_one_noun+=("rolebinding")
    must_have_one_noun+=("route")
    must_have_one_noun+=("scheduledjob")
    must_have_one_noun+=("secret")
    must_have_one_noun+=("securitycontextconstraints")
    must_have_one_noun+=("service")
    must_have_one_noun+=("serviceaccount")
    must_have_one_noun+=("template")
    must_have_one_noun+=("user")
    must_have_one_noun+=("useridentitymapping")
    noun_aliases=()
    noun_aliases+=("certificatesigningrequests")
    noun_aliases+=("cm")
    noun_aliases+=("configmaps")
    noun_aliases+=("csr")
    noun_aliases+=("daemonsets")
    noun_aliases+=("deploy")
    noun_aliases+=("deployments")
    noun_aliases+=("ds")
    noun_aliases+=("endpoints")
    noun_aliases+=("ep")
    noun_aliases+=("horizontalpodautoscalers")
    noun_aliases+=("horizontalpodautoscalers")
    noun_aliases+=("hpa")
    noun_aliases+=("ing")
    noun_aliases+=("ingresses")
    noun_aliases+=("jobs")
    noun_aliases+=("jobs")
    noun_aliases+=("limitranges")
    noun_aliases+=("limits")
    noun_aliases+=("namespaces")
    noun_aliases+=("networkpolicies")
    noun_aliases+=("no")
    noun_aliases+=("nodes")
    noun_aliases+=("ns")
    noun_aliases+=("persistentvolumeclaims")
    noun_aliases+=("persistentvolumes")
    noun_aliases+=("petsets")
    noun_aliases+=("po")
    noun_aliases+=("pods")
    noun_aliases+=("pv")
    noun_aliases+=("pvc")
    noun_aliases+=("quota")
    noun_aliases+=("rc")
    noun_aliases+=("replicasets")
    noun_aliases+=("replicationcontrollers")
    noun_aliases+=("resourcequotas")
    noun_aliases+=("rs")
    noun_aliases+=("sa")
    noun_aliases+=("scheduledjobs")
    noun_aliases+=("secrets")
    noun_aliases+=("securitycontextconstraintses")
    noun_aliases+=("serviceaccounts")
    noun_aliases+=("services")
    noun_aliases+=("svc")
}

_oc_edit()
{
    last_command="oc_edit"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--include-extended-apis")
    local_nonpersistent_flags+=("--include-extended-apis")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--record")
    local_nonpersistent_flags+=("--record")
    flags+=("--recursive")
    flags+=("-R")
    local_nonpersistent_flags+=("--recursive")
    flags+=("--save-config")
    local_nonpersistent_flags+=("--save-config")
    flags+=("--schema-cache-dir=")
    flags_with_completion+=("--schema-cache-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--schema-cache-dir=")
    flags+=("--validate")
    local_nonpersistent_flags+=("--validate")
    flags+=("--windows-line-endings")
    local_nonpersistent_flags+=("--windows-line-endings")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    must_have_one_noun+=("appliedclusterresourcequota")
    must_have_one_noun+=("build")
    must_have_one_noun+=("buildconfig")
    must_have_one_noun+=("certificatesigningrequest")
    must_have_one_noun+=("cluster")
    must_have_one_noun+=("clusternetwork")
    must_have_one_noun+=("clusterpolicy")
    must_have_one_noun+=("clusterpolicybinding")
    must_have_one_noun+=("clusterresourcequota")
    must_have_one_noun+=("clusterrole")
    must_have_one_noun+=("clusterrole")
    must_have_one_noun+=("clusterrolebinding")
    must_have_one_noun+=("clusterrolebinding")
    must_have_one_noun+=("componentstatus")
    must_have_one_noun+=("configmap")
    must_have_one_noun+=("daemonset")
    must_have_one_noun+=("deployment")
    must_have_one_noun+=("deploymentconfig")
    must_have_one_noun+=("egressnetworkpolicy")
    must_have_one_noun+=("endpoints")
    must_have_one_noun+=("event")
    must_have_one_noun+=("group")
    must_have_one_noun+=("horizontalpodautoscaler")
    must_have_one_noun+=("hostsubnet")
    must_have_one_noun+=("identity")
    must_have_one_noun+=("image")
    must_have_one_noun+=("imagestream")
    must_have_one_noun+=("imagestreamimage")
    must_have_one_noun+=("imagestreamtag")
    must_have_one_noun+=("ingress")
    must_have_one_noun+=("ispersonalsubjectaccessreview")
    must_have_one_noun+=("job")
    must_have_one_noun+=("limitrange")
    must_have_one_noun+=("namespace")
    must_have_one_noun+=("netnamespace")
    must_have_one_noun+=("networkpolicy")
    must_have_one_noun+=("node")
    must_have_one_noun+=("oauthaccesstoken")
    must_have_one_noun+=("oauthauthorizetoken")
    must_have_one_noun+=("oauthclient")
    must_have_one_noun+=("oauthclientauthorization")
    must_have_one_noun+=("persistentvolume")
    must_have_one_noun+=("persistentvolumeclaim")
    must_have_one_noun+=("petset")
    must_have_one_noun+=("pod")
    must_have_one_noun+=("podsecuritypolicy")
    must_have_one_noun+=("podtemplate")
    must_have_one_noun+=("policy")
    must_have_one_noun+=("policybinding")
    must_have_one_noun+=("project")
    must_have_one_noun+=("replicaset")
    must_have_one_noun+=("replicationcontroller")
    must_have_one_noun+=("resourcequota")
    must_have_one_noun+=("role")
    must_have_one_noun+=("role")
    must_have_one_noun+=("rolebinding")
    must_have_one_noun+=("rolebinding")
    must_have_one_noun+=("route")
    must_have_one_noun+=("scheduledjob")
    must_have_one_noun+=("secret")
    must_have_one_noun+=("securitycontextconstraints")
    must_have_one_noun+=("service")
    must_have_one_noun+=("serviceaccount")
    must_have_one_noun+=("storageclass")
    must_have_one_noun+=("template")
    must_have_one_noun+=("thirdpartyresource")
    must_have_one_noun+=("thirdpartyresourcedata")
    must_have_one_noun+=("user")
    must_have_one_noun+=("useridentitymapping")
    noun_aliases=()
    noun_aliases+=("appliedclusterresourcequotas")
    noun_aliases+=("buildconfigs")
    noun_aliases+=("builds")
    noun_aliases+=("certificatesigningrequests")
    noun_aliases+=("clusternetworks")
    noun_aliases+=("clusterpolicies")
    noun_aliases+=("clusterpolicybindings")
    noun_aliases+=("clusterresourcequotas")
    noun_aliases+=("clusterrolebindings")
    noun_aliases+=("clusterrolebindings")
    noun_aliases+=("clusterroles")
    noun_aliases+=("clusterroles")
    noun_aliases+=("clusters")
    noun_aliases+=("cm")
    noun_aliases+=("componentstatuses")
    noun_aliases+=("configmaps")
    noun_aliases+=("cs")
    noun_aliases+=("csr")
    noun_aliases+=("daemonsets")
    noun_aliases+=("deploy")
    noun_aliases+=("deploymentconfigs")
    noun_aliases+=("deployments")
    noun_aliases+=("ds")
    noun_aliases+=("egressnetworkpolicies")
    noun_aliases+=("endpoints")
    noun_aliases+=("ep")
    noun_aliases+=("ev")
    noun_aliases+=("events")
    noun_aliases+=("groups")
    noun_aliases+=("horizontalpodautoscalers")
    noun_aliases+=("hostsubnets")
    noun_aliases+=("hpa")
    noun_aliases+=("identities")
    noun_aliases+=("images")
    noun_aliases+=("imagestreamimages")
    noun_aliases+=("imagestreams")
    noun_aliases+=("imagestreamtags")
    noun_aliases+=("ing")
    noun_aliases+=("ingresses")
    noun_aliases+=("ispersonalsubjectaccessreviews")
    noun_aliases+=("jobs")
    noun_aliases+=("limitranges")
    noun_aliases+=("limits")
    noun_aliases+=("namespaces")
    noun_aliases+=("netnamespaces")
    noun_aliases+=("networkpolicies")
    noun_aliases+=("no")
    noun_aliases+=("nodes")
    noun_aliases+=("ns")
    noun_aliases+=("oauthaccesstokens")
    noun_aliases+=("oauthauthorizetokens")
    noun_aliases+=("oauthclientauthorizations")
    noun_aliases+=("oauthclients")
    noun_aliases+=("persistentvolumeclaims")
    noun_aliases+=("persistentvolumes")
    noun_aliases+=("petsets")
    noun_aliases+=("po")
    noun_aliases+=("pods")
    noun_aliases+=("podsecuritypolicies")
    noun_aliases+=("podtemplates")
    noun_aliases+=("policies")
    noun_aliases+=("policybindings")
    noun_aliases+=("projects")
    noun_aliases+=("pv")
    noun_aliases+=("pvc")
    noun_aliases+=("quota")
    noun_aliases+=("rc")
    noun_aliases+=("replicasets")
    noun_aliases+=("replicationcontrollers")
    noun_aliases+=("resourcequotas")
    noun_aliases+=("rolebindings")
    noun_aliases+=("rolebindings")
    noun_aliases+=("roles")
    noun_aliases+=("roles")
    noun_aliases+=("routes")
    noun_aliases+=("rs")
    noun_aliases+=("sa")
    noun_aliases+=("scheduledjobs")
    noun_aliases+=("secrets")
    noun_aliases+=("securitycontextconstraintses")
    noun_aliases+=("serviceaccounts")
    noun_aliases+=("services")
    noun_aliases+=("storageclasses")
    noun_aliases+=("svc")
    noun_aliases+=("templates")
    noun_aliases+=("thirdpartyresourcedatas")
    noun_aliases+=("thirdpartyresources")
    noun_aliases+=("useridentitymappings")
    noun_aliases+=("users")
}

_oc_env()
{
    last_command="oc_env"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all")
    local_nonpersistent_flags+=("--all")
    flags+=("--containers=")
    two_word_flags+=("-c")
    local_nonpersistent_flags+=("--containers=")
    flags+=("--env=")
    two_word_flags+=("-e")
    local_nonpersistent_flags+=("--env=")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--from=")
    local_nonpersistent_flags+=("--from=")
    flags+=("--list")
    local_nonpersistent_flags+=("--list")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--overwrite")
    local_nonpersistent_flags+=("--overwrite")
    flags+=("--prefix=")
    local_nonpersistent_flags+=("--prefix=")
    flags+=("--resolve")
    local_nonpersistent_flags+=("--resolve")
    flags+=("--resource-version=")
    local_nonpersistent_flags+=("--resource-version=")
    flags+=("--selector=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_ex_dockerbuild()
{
    last_command="oc_ex_dockerbuild"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--allow-pull")
    local_nonpersistent_flags+=("--allow-pull")
    flags+=("--dockerfile=")
    flags_with_completion+=("--dockerfile")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--dockerfile=")
    flags+=("--mount=")
    local_nonpersistent_flags+=("--mount=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_ex()
{
    last_command="oc_ex"
    commands=()
    commands+=("dockerbuild")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_exec()
{
    last_command="oc_exec"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--container=")
    two_word_flags+=("-c")
    local_nonpersistent_flags+=("--container=")
    flags+=("--pod=")
    two_word_flags+=("-p")
    local_nonpersistent_flags+=("--pod=")
    flags+=("--stdin")
    flags+=("-i")
    local_nonpersistent_flags+=("--stdin")
    flags+=("--tty")
    flags+=("-t")
    local_nonpersistent_flags+=("--tty")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_explain()
{
    last_command="oc_explain"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--include-extended-apis")
    local_nonpersistent_flags+=("--include-extended-apis")
    flags+=("--recursive")
    local_nonpersistent_flags+=("--recursive")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_export()
{
    last_command="oc_export"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all-namespaces")
    local_nonpersistent_flags+=("--all-namespaces")
    flags+=("--as-template=")
    local_nonpersistent_flags+=("--as-template=")
    flags+=("--exact")
    local_nonpersistent_flags+=("--exact")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("_filedir")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--raw")
    local_nonpersistent_flags+=("--raw")
    flags+=("--selector=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_expose()
{
    last_command="oc_expose"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--cluster-ip=")
    local_nonpersistent_flags+=("--cluster-ip=")
    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--external-ip=")
    local_nonpersistent_flags+=("--external-ip=")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--generator=")
    local_nonpersistent_flags+=("--generator=")
    flags+=("--hostname=")
    local_nonpersistent_flags+=("--hostname=")
    flags+=("--labels=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--labels=")
    flags+=("--load-balancer-ip=")
    local_nonpersistent_flags+=("--load-balancer-ip=")
    flags+=("--name=")
    local_nonpersistent_flags+=("--name=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--overrides=")
    local_nonpersistent_flags+=("--overrides=")
    flags+=("--path=")
    local_nonpersistent_flags+=("--path=")
    flags+=("--port=")
    local_nonpersistent_flags+=("--port=")
    flags+=("--protocol=")
    local_nonpersistent_flags+=("--protocol=")
    flags+=("--record")
    local_nonpersistent_flags+=("--record")
    flags+=("--recursive")
    flags+=("-R")
    local_nonpersistent_flags+=("--recursive")
    flags+=("--save-config")
    local_nonpersistent_flags+=("--save-config")
    flags+=("--selector=")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--session-affinity=")
    local_nonpersistent_flags+=("--session-affinity=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--target-port=")
    local_nonpersistent_flags+=("--target-port=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--type=")
    local_nonpersistent_flags+=("--type=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    must_have_one_noun+=("deployment")
    must_have_one_noun+=("pod")
    must_have_one_noun+=("replicaset")
    must_have_one_noun+=("replicationcontroller")
    must_have_one_noun+=("service")
    noun_aliases=()
    noun_aliases+=("deploy")
    noun_aliases+=("deployments")
    noun_aliases+=("po")
    noun_aliases+=("pods")
    noun_aliases+=("rc")
    noun_aliases+=("replicasets")
    noun_aliases+=("replicationcontrollers")
    noun_aliases+=("rs")
    noun_aliases+=("services")
    noun_aliases+=("svc")
}

_oc_extract()
{
    last_command="oc_extract"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--confirm")
    local_nonpersistent_flags+=("--confirm")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("_filedir")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--keys=")
    local_nonpersistent_flags+=("--keys=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--to=")
    local_nonpersistent_flags+=("--to=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_get()
{
    last_command="oc_get"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all-namespaces")
    local_nonpersistent_flags+=("--all-namespaces")
    flags+=("--export")
    local_nonpersistent_flags+=("--export")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--include-extended-apis")
    local_nonpersistent_flags+=("--include-extended-apis")
    flags+=("--label-columns=")
    two_word_flags+=("-L")
    local_nonpersistent_flags+=("--label-columns=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--raw=")
    local_nonpersistent_flags+=("--raw=")
    flags+=("--recursive")
    flags+=("-R")
    local_nonpersistent_flags+=("--recursive")
    flags+=("--selector=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-kind")
    local_nonpersistent_flags+=("--show-kind")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--watch")
    flags+=("-w")
    local_nonpersistent_flags+=("--watch")
    flags+=("--watch-only")
    local_nonpersistent_flags+=("--watch-only")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    must_have_one_noun+=("appliedclusterresourcequota")
    must_have_one_noun+=("build")
    must_have_one_noun+=("buildconfig")
    must_have_one_noun+=("certificatesigningrequest")
    must_have_one_noun+=("cluster")
    must_have_one_noun+=("clusternetwork")
    must_have_one_noun+=("clusterpolicy")
    must_have_one_noun+=("clusterpolicybinding")
    must_have_one_noun+=("clusterresourcequota")
    must_have_one_noun+=("clusterrole")
    must_have_one_noun+=("clusterrole")
    must_have_one_noun+=("clusterrolebinding")
    must_have_one_noun+=("clusterrolebinding")
    must_have_one_noun+=("componentstatus")
    must_have_one_noun+=("configmap")
    must_have_one_noun+=("daemonset")
    must_have_one_noun+=("deployment")
    must_have_one_noun+=("deploymentconfig")
    must_have_one_noun+=("egressnetworkpolicy")
    must_have_one_noun+=("endpoints")
    must_have_one_noun+=("event")
    must_have_one_noun+=("group")
    must_have_one_noun+=("horizontalpodautoscaler")
    must_have_one_noun+=("hostsubnet")
    must_have_one_noun+=("identity")
    must_have_one_noun+=("image")
    must_have_one_noun+=("imagestream")
    must_have_one_noun+=("imagestreamimage")
    must_have_one_noun+=("imagestreamtag")
    must_have_one_noun+=("ingress")
    must_have_one_noun+=("ispersonalsubjectaccessreview")
    must_have_one_noun+=("job")
    must_have_one_noun+=("limitrange")
    must_have_one_noun+=("namespace")
    must_have_one_noun+=("netnamespace")
    must_have_one_noun+=("networkpolicy")
    must_have_one_noun+=("node")
    must_have_one_noun+=("oauthaccesstoken")
    must_have_one_noun+=("oauthauthorizetoken")
    must_have_one_noun+=("oauthclient")
    must_have_one_noun+=("oauthclientauthorization")
    must_have_one_noun+=("persistentvolume")
    must_have_one_noun+=("persistentvolumeclaim")
    must_have_one_noun+=("petset")
    must_have_one_noun+=("pod")
    must_have_one_noun+=("podsecuritypolicy")
    must_have_one_noun+=("podtemplate")
    must_have_one_noun+=("policy")
    must_have_one_noun+=("policybinding")
    must_have_one_noun+=("project")
    must_have_one_noun+=("replicaset")
    must_have_one_noun+=("replicationcontroller")
    must_have_one_noun+=("resourcequota")
    must_have_one_noun+=("role")
    must_have_one_noun+=("role")
    must_have_one_noun+=("rolebinding")
    must_have_one_noun+=("rolebinding")
    must_have_one_noun+=("route")
    must_have_one_noun+=("scheduledjob")
    must_have_one_noun+=("secret")
    must_have_one_noun+=("securitycontextconstraints")
    must_have_one_noun+=("service")
    must_have_one_noun+=("serviceaccount")
    must_have_one_noun+=("storageclass")
    must_have_one_noun+=("template")
    must_have_one_noun+=("thirdpartyresource")
    must_have_one_noun+=("thirdpartyresourcedata")
    must_have_one_noun+=("user")
    must_have_one_noun+=("useridentitymapping")
    noun_aliases=()
    noun_aliases+=("appliedclusterresourcequotas")
    noun_aliases+=("buildconfigs")
    noun_aliases+=("builds")
    noun_aliases+=("certificatesigningrequests")
    noun_aliases+=("clusternetworks")
    noun_aliases+=("clusterpolicies")
    noun_aliases+=("clusterpolicybindings")
    noun_aliases+=("clusterresourcequotas")
    noun_aliases+=("clusterrolebindings")
    noun_aliases+=("clusterrolebindings")
    noun_aliases+=("clusterroles")
    noun_aliases+=("clusterroles")
    noun_aliases+=("clusters")
    noun_aliases+=("cm")
    noun_aliases+=("componentstatuses")
    noun_aliases+=("configmaps")
    noun_aliases+=("cs")
    noun_aliases+=("csr")
    noun_aliases+=("daemonsets")
    noun_aliases+=("deploy")
    noun_aliases+=("deploymentconfigs")
    noun_aliases+=("deployments")
    noun_aliases+=("ds")
    noun_aliases+=("egressnetworkpolicies")
    noun_aliases+=("endpoints")
    noun_aliases+=("ep")
    noun_aliases+=("ev")
    noun_aliases+=("events")
    noun_aliases+=("groups")
    noun_aliases+=("horizontalpodautoscalers")
    noun_aliases+=("hostsubnets")
    noun_aliases+=("hpa")
    noun_aliases+=("identities")
    noun_aliases+=("images")
    noun_aliases+=("imagestreamimages")
    noun_aliases+=("imagestreams")
    noun_aliases+=("imagestreamtags")
    noun_aliases+=("ing")
    noun_aliases+=("ingresses")
    noun_aliases+=("ispersonalsubjectaccessreviews")
    noun_aliases+=("jobs")
    noun_aliases+=("limitranges")
    noun_aliases+=("limits")
    noun_aliases+=("namespaces")
    noun_aliases+=("netnamespaces")
    noun_aliases+=("networkpolicies")
    noun_aliases+=("no")
    noun_aliases+=("nodes")
    noun_aliases+=("ns")
    noun_aliases+=("oauthaccesstokens")
    noun_aliases+=("oauthauthorizetokens")
    noun_aliases+=("oauthclientauthorizations")
    noun_aliases+=("oauthclients")
    noun_aliases+=("persistentvolumeclaims")
    noun_aliases+=("persistentvolumes")
    noun_aliases+=("petsets")
    noun_aliases+=("po")
    noun_aliases+=("pods")
    noun_aliases+=("podsecuritypolicies")
    noun_aliases+=("podtemplates")
    noun_aliases+=("policies")
    noun_aliases+=("policybindings")
    noun_aliases+=("projects")
    noun_aliases+=("pv")
    noun_aliases+=("pvc")
    noun_aliases+=("quota")
    noun_aliases+=("rc")
    noun_aliases+=("replicasets")
    noun_aliases+=("replicationcontrollers")
    noun_aliases+=("resourcequotas")
    noun_aliases+=("rolebindings")
    noun_aliases+=("rolebindings")
    noun_aliases+=("roles")
    noun_aliases+=("roles")
    noun_aliases+=("routes")
    noun_aliases+=("rs")
    noun_aliases+=("sa")
    noun_aliases+=("scheduledjobs")
    noun_aliases+=("secrets")
    noun_aliases+=("securitycontextconstraintses")
    noun_aliases+=("serviceaccounts")
    noun_aliases+=("services")
    noun_aliases+=("storageclasses")
    noun_aliases+=("svc")
    noun_aliases+=("templates")
    noun_aliases+=("thirdpartyresourcedatas")
    noun_aliases+=("thirdpartyresources")
    noun_aliases+=("useridentitymappings")
    noun_aliases+=("users")
}

_oc_idle()
{
    last_command="oc_idle"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all")
    local_nonpersistent_flags+=("--all")
    flags+=("--all-namespaces")
    local_nonpersistent_flags+=("--all-namespaces")
    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--resource-names-file=")
    flags_with_completion+=("--resource-names-file")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--resource-names-file=")
    flags+=("--selector=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_import_app.json()
{
    last_command="oc_import_app.json"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as-template=")
    local_nonpersistent_flags+=("--as-template=")
    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--generator=")
    local_nonpersistent_flags+=("--generator=")
    flags+=("--image=")
    local_nonpersistent_flags+=("--image=")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_flag+=("--filename=")
    must_have_one_flag+=("-f")
    must_have_one_noun=()
    noun_aliases=()
}

_oc_import_docker-compose()
{
    last_command="oc_import_docker-compose"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as-template=")
    local_nonpersistent_flags+=("--as-template=")
    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--generator=")
    local_nonpersistent_flags+=("--generator=")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_flag+=("--filename=")
    must_have_one_flag+=("-f")
    must_have_one_noun=()
    noun_aliases=()
}

_oc_import()
{
    last_command="oc_import"
    commands=()
    commands+=("app.json")
    commands+=("docker-compose")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_import-image()
{
    last_command="oc_import-image"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all")
    local_nonpersistent_flags+=("--all")
    flags+=("--confirm")
    local_nonpersistent_flags+=("--confirm")
    flags+=("--from=")
    local_nonpersistent_flags+=("--from=")
    flags+=("--insecure")
    local_nonpersistent_flags+=("--insecure")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_label()
{
    last_command="oc_label"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all")
    local_nonpersistent_flags+=("--all")
    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--include-extended-apis")
    local_nonpersistent_flags+=("--include-extended-apis")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--overwrite")
    local_nonpersistent_flags+=("--overwrite")
    flags+=("--record")
    local_nonpersistent_flags+=("--record")
    flags+=("--recursive")
    flags+=("-R")
    local_nonpersistent_flags+=("--recursive")
    flags+=("--resource-version=")
    local_nonpersistent_flags+=("--resource-version=")
    flags+=("--selector=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    must_have_one_noun+=("appliedclusterresourcequota")
    must_have_one_noun+=("build")
    must_have_one_noun+=("buildconfig")
    must_have_one_noun+=("certificatesigningrequest")
    must_have_one_noun+=("cluster")
    must_have_one_noun+=("clusternetwork")
    must_have_one_noun+=("clusterpolicy")
    must_have_one_noun+=("clusterpolicybinding")
    must_have_one_noun+=("clusterresourcequota")
    must_have_one_noun+=("clusterrole")
    must_have_one_noun+=("clusterrole")
    must_have_one_noun+=("clusterrolebinding")
    must_have_one_noun+=("clusterrolebinding")
    must_have_one_noun+=("componentstatus")
    must_have_one_noun+=("configmap")
    must_have_one_noun+=("daemonset")
    must_have_one_noun+=("deployment")
    must_have_one_noun+=("deploymentconfig")
    must_have_one_noun+=("egressnetworkpolicy")
    must_have_one_noun+=("endpoints")
    must_have_one_noun+=("event")
    must_have_one_noun+=("group")
    must_have_one_noun+=("horizontalpodautoscaler")
    must_have_one_noun+=("hostsubnet")
    must_have_one_noun+=("identity")
    must_have_one_noun+=("image")
    must_have_one_noun+=("imagestream")
    must_have_one_noun+=("imagestreamimage")
    must_have_one_noun+=("imagestreamtag")
    must_have_one_noun+=("ingress")
    must_have_one_noun+=("ispersonalsubjectaccessreview")
    must_have_one_noun+=("job")
    must_have_one_noun+=("limitrange")
    must_have_one_noun+=("namespace")
    must_have_one_noun+=("netnamespace")
    must_have_one_noun+=("networkpolicy")
    must_have_one_noun+=("node")
    must_have_one_noun+=("oauthaccesstoken")
    must_have_one_noun+=("oauthauthorizetoken")
    must_have_one_noun+=("oauthclient")
    must_have_one_noun+=("oauthclientauthorization")
    must_have_one_noun+=("persistentvolume")
    must_have_one_noun+=("persistentvolumeclaim")
    must_have_one_noun+=("petset")
    must_have_one_noun+=("pod")
    must_have_one_noun+=("podsecuritypolicy")
    must_have_one_noun+=("podtemplate")
    must_have_one_noun+=("policy")
    must_have_one_noun+=("policybinding")
    must_have_one_noun+=("project")
    must_have_one_noun+=("replicaset")
    must_have_one_noun+=("replicationcontroller")
    must_have_one_noun+=("resourcequota")
    must_have_one_noun+=("role")
    must_have_one_noun+=("role")
    must_have_one_noun+=("rolebinding")
    must_have_one_noun+=("rolebinding")
    must_have_one_noun+=("route")
    must_have_one_noun+=("scheduledjob")
    must_have_one_noun+=("secret")
    must_have_one_noun+=("securitycontextconstraints")
    must_have_one_noun+=("service")
    must_have_one_noun+=("serviceaccount")
    must_have_one_noun+=("storageclass")
    must_have_one_noun+=("template")
    must_have_one_noun+=("thirdpartyresource")
    must_have_one_noun+=("thirdpartyresourcedata")
    must_have_one_noun+=("user")
    must_have_one_noun+=("useridentitymapping")
    noun_aliases=()
    noun_aliases+=("appliedclusterresourcequotas")
    noun_aliases+=("buildconfigs")
    noun_aliases+=("builds")
    noun_aliases+=("certificatesigningrequests")
    noun_aliases+=("clusternetworks")
    noun_aliases+=("clusterpolicies")
    noun_aliases+=("clusterpolicybindings")
    noun_aliases+=("clusterresourcequotas")
    noun_aliases+=("clusterrolebindings")
    noun_aliases+=("clusterrolebindings")
    noun_aliases+=("clusterroles")
    noun_aliases+=("clusterroles")
    noun_aliases+=("clusters")
    noun_aliases+=("cm")
    noun_aliases+=("componentstatuses")
    noun_aliases+=("configmaps")
    noun_aliases+=("cs")
    noun_aliases+=("csr")
    noun_aliases+=("daemonsets")
    noun_aliases+=("deploy")
    noun_aliases+=("deploymentconfigs")
    noun_aliases+=("deployments")
    noun_aliases+=("ds")
    noun_aliases+=("egressnetworkpolicies")
    noun_aliases+=("endpoints")
    noun_aliases+=("ep")
    noun_aliases+=("ev")
    noun_aliases+=("events")
    noun_aliases+=("groups")
    noun_aliases+=("horizontalpodautoscalers")
    noun_aliases+=("hostsubnets")
    noun_aliases+=("hpa")
    noun_aliases+=("identities")
    noun_aliases+=("images")
    noun_aliases+=("imagestreamimages")
    noun_aliases+=("imagestreams")
    noun_aliases+=("imagestreamtags")
    noun_aliases+=("ing")
    noun_aliases+=("ingresses")
    noun_aliases+=("ispersonalsubjectaccessreviews")
    noun_aliases+=("jobs")
    noun_aliases+=("limitranges")
    noun_aliases+=("limits")
    noun_aliases+=("namespaces")
    noun_aliases+=("netnamespaces")
    noun_aliases+=("networkpolicies")
    noun_aliases+=("no")
    noun_aliases+=("nodes")
    noun_aliases+=("ns")
    noun_aliases+=("oauthaccesstokens")
    noun_aliases+=("oauthauthorizetokens")
    noun_aliases+=("oauthclientauthorizations")
    noun_aliases+=("oauthclients")
    noun_aliases+=("persistentvolumeclaims")
    noun_aliases+=("persistentvolumes")
    noun_aliases+=("petsets")
    noun_aliases+=("po")
    noun_aliases+=("pods")
    noun_aliases+=("podsecuritypolicies")
    noun_aliases+=("podtemplates")
    noun_aliases+=("policies")
    noun_aliases+=("policybindings")
    noun_aliases+=("projects")
    noun_aliases+=("pv")
    noun_aliases+=("pvc")
    noun_aliases+=("quota")
    noun_aliases+=("rc")
    noun_aliases+=("replicasets")
    noun_aliases+=("replicationcontrollers")
    noun_aliases+=("resourcequotas")
    noun_aliases+=("rolebindings")
    noun_aliases+=("rolebindings")
    noun_aliases+=("roles")
    noun_aliases+=("roles")
    noun_aliases+=("routes")
    noun_aliases+=("rs")
    noun_aliases+=("sa")
    noun_aliases+=("scheduledjobs")
    noun_aliases+=("secrets")
    noun_aliases+=("securitycontextconstraintses")
    noun_aliases+=("serviceaccounts")
    noun_aliases+=("services")
    noun_aliases+=("storageclasses")
    noun_aliases+=("svc")
    noun_aliases+=("templates")
    noun_aliases+=("thirdpartyresourcedatas")
    noun_aliases+=("thirdpartyresources")
    noun_aliases+=("useridentitymappings")
    noun_aliases+=("users")
}

_oc_login()
{
    last_command="oc_login"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--password=")
    two_word_flags+=("-p")
    local_nonpersistent_flags+=("--password=")
    flags+=("--username=")
    two_word_flags+=("-u")
    local_nonpersistent_flags+=("--username=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_logout()
{
    last_command="oc_logout"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_logs()
{
    last_command="oc_logs"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--container=")
    two_word_flags+=("-c")
    local_nonpersistent_flags+=("--container=")
    flags+=("--follow")
    flags+=("-f")
    local_nonpersistent_flags+=("--follow")
    flags+=("--include-extended-apis")
    local_nonpersistent_flags+=("--include-extended-apis")
    flags+=("--limit-bytes=")
    local_nonpersistent_flags+=("--limit-bytes=")
    flags+=("--previous")
    flags+=("-p")
    local_nonpersistent_flags+=("--previous")
    flags+=("--since=")
    local_nonpersistent_flags+=("--since=")
    flags+=("--since-time=")
    local_nonpersistent_flags+=("--since-time=")
    flags+=("--tail=")
    local_nonpersistent_flags+=("--tail=")
    flags+=("--timestamps")
    local_nonpersistent_flags+=("--timestamps")
    flags+=("--version=")
    local_nonpersistent_flags+=("--version=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_new-app()
{
    last_command="oc_new-app"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--allow-missing-images")
    local_nonpersistent_flags+=("--allow-missing-images")
    flags+=("--allow-missing-imagestream-tags")
    local_nonpersistent_flags+=("--allow-missing-imagestream-tags")
    flags+=("--as-test")
    local_nonpersistent_flags+=("--as-test")
    flags+=("--code=")
    local_nonpersistent_flags+=("--code=")
    flags+=("--context-dir=")
    local_nonpersistent_flags+=("--context-dir=")
    flags+=("--docker-image=")
    local_nonpersistent_flags+=("--docker-image=")
    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--env=")
    two_word_flags+=("-e")
    local_nonpersistent_flags+=("--env=")
    flags+=("--file=")
    flags_with_completion+=("--file")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    local_nonpersistent_flags+=("--file=")
    flags+=("--grant-install-rights")
    local_nonpersistent_flags+=("--grant-install-rights")
    flags+=("--group=")
    local_nonpersistent_flags+=("--group=")
    flags+=("--image-stream=")
    two_word_flags+=("-i")
    local_nonpersistent_flags+=("--image-stream=")
    flags+=("--insecure-registry")
    local_nonpersistent_flags+=("--insecure-registry")
    flags+=("--labels=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--labels=")
    flags+=("--list")
    flags+=("-L")
    local_nonpersistent_flags+=("--list")
    flags+=("--name=")
    local_nonpersistent_flags+=("--name=")
    flags+=("--no-install")
    local_nonpersistent_flags+=("--no-install")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--param=")
    two_word_flags+=("-p")
    local_nonpersistent_flags+=("--param=")
    flags+=("--search")
    flags+=("-S")
    local_nonpersistent_flags+=("--search")
    flags+=("--strategy=")
    local_nonpersistent_flags+=("--strategy=")
    flags+=("--template=")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_new-build()
{
    last_command="oc_new-build"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--allow-missing-images")
    local_nonpersistent_flags+=("--allow-missing-images")
    flags+=("--allow-missing-imagestream-tags")
    local_nonpersistent_flags+=("--allow-missing-imagestream-tags")
    flags+=("--binary")
    local_nonpersistent_flags+=("--binary")
    flags+=("--build-secret=")
    local_nonpersistent_flags+=("--build-secret=")
    flags+=("--code=")
    local_nonpersistent_flags+=("--code=")
    flags+=("--context-dir=")
    local_nonpersistent_flags+=("--context-dir=")
    flags+=("--docker-image=")
    local_nonpersistent_flags+=("--docker-image=")
    flags+=("--dockerfile=")
    two_word_flags+=("-D")
    local_nonpersistent_flags+=("--dockerfile=")
    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--env=")
    two_word_flags+=("-e")
    local_nonpersistent_flags+=("--env=")
    flags+=("--image-stream=")
    two_word_flags+=("-i")
    local_nonpersistent_flags+=("--image-stream=")
    flags+=("--labels=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--labels=")
    flags+=("--name=")
    local_nonpersistent_flags+=("--name=")
    flags+=("--no-output")
    local_nonpersistent_flags+=("--no-output")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--source-image=")
    local_nonpersistent_flags+=("--source-image=")
    flags+=("--source-image-path=")
    local_nonpersistent_flags+=("--source-image-path=")
    flags+=("--strategy=")
    local_nonpersistent_flags+=("--strategy=")
    flags+=("--to=")
    local_nonpersistent_flags+=("--to=")
    flags+=("--to-docker")
    local_nonpersistent_flags+=("--to-docker")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_new-project()
{
    last_command="oc_new-project"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--description=")
    local_nonpersistent_flags+=("--description=")
    flags+=("--display-name=")
    local_nonpersistent_flags+=("--display-name=")
    flags+=("--skip-config-write")
    local_nonpersistent_flags+=("--skip-config-write")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_observe()
{
    last_command="oc_observe"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all-namespaces")
    local_nonpersistent_flags+=("--all-namespaces")
    flags+=("--argument=")
    two_word_flags+=("-a")
    local_nonpersistent_flags+=("--argument=")
    flags+=("--delete=")
    two_word_flags+=("-d")
    local_nonpersistent_flags+=("--delete=")
    flags+=("--exit-after=")
    local_nonpersistent_flags+=("--exit-after=")
    flags+=("--listen-addr=")
    local_nonpersistent_flags+=("--listen-addr=")
    flags+=("--maximum-errors=")
    local_nonpersistent_flags+=("--maximum-errors=")
    flags+=("--names=")
    local_nonpersistent_flags+=("--names=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--object-env-var=")
    local_nonpersistent_flags+=("--object-env-var=")
    flags+=("--once")
    local_nonpersistent_flags+=("--once")
    flags+=("--output=")
    local_nonpersistent_flags+=("--output=")
    flags+=("--print-metrics-on-exit")
    local_nonpersistent_flags+=("--print-metrics-on-exit")
    flags+=("--resync-period=")
    local_nonpersistent_flags+=("--resync-period=")
    flags+=("--retry-count=")
    local_nonpersistent_flags+=("--retry-count=")
    flags+=("--retry-on-exit-code=")
    local_nonpersistent_flags+=("--retry-on-exit-code=")
    flags+=("--strict-templates")
    local_nonpersistent_flags+=("--strict-templates")
    flags+=("--type-env-var=")
    local_nonpersistent_flags+=("--type-env-var=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_options()
{
    last_command="oc_options"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_patch()
{
    last_command="oc_patch"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--include-extended-apis")
    local_nonpersistent_flags+=("--include-extended-apis")
    flags+=("--local")
    local_nonpersistent_flags+=("--local")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--patch=")
    two_word_flags+=("-p")
    local_nonpersistent_flags+=("--patch=")
    flags+=("--record")
    local_nonpersistent_flags+=("--record")
    flags+=("--recursive")
    flags+=("-R")
    local_nonpersistent_flags+=("--recursive")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--type=")
    local_nonpersistent_flags+=("--type=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_flag+=("--patch=")
    must_have_one_flag+=("-p")
    must_have_one_noun=()
    must_have_one_noun+=("appliedclusterresourcequota")
    must_have_one_noun+=("build")
    must_have_one_noun+=("buildconfig")
    must_have_one_noun+=("certificatesigningrequest")
    must_have_one_noun+=("cluster")
    must_have_one_noun+=("clusternetwork")
    must_have_one_noun+=("clusterpolicy")
    must_have_one_noun+=("clusterpolicybinding")
    must_have_one_noun+=("clusterresourcequota")
    must_have_one_noun+=("clusterrole")
    must_have_one_noun+=("clusterrole")
    must_have_one_noun+=("clusterrolebinding")
    must_have_one_noun+=("clusterrolebinding")
    must_have_one_noun+=("componentstatus")
    must_have_one_noun+=("configmap")
    must_have_one_noun+=("daemonset")
    must_have_one_noun+=("deployment")
    must_have_one_noun+=("deploymentconfig")
    must_have_one_noun+=("egressnetworkpolicy")
    must_have_one_noun+=("endpoints")
    must_have_one_noun+=("event")
    must_have_one_noun+=("group")
    must_have_one_noun+=("horizontalpodautoscaler")
    must_have_one_noun+=("hostsubnet")
    must_have_one_noun+=("identity")
    must_have_one_noun+=("image")
    must_have_one_noun+=("imagestream")
    must_have_one_noun+=("imagestreamimage")
    must_have_one_noun+=("imagestreamtag")
    must_have_one_noun+=("ingress")
    must_have_one_noun+=("ispersonalsubjectaccessreview")
    must_have_one_noun+=("job")
    must_have_one_noun+=("limitrange")
    must_have_one_noun+=("namespace")
    must_have_one_noun+=("netnamespace")
    must_have_one_noun+=("networkpolicy")
    must_have_one_noun+=("node")
    must_have_one_noun+=("oauthaccesstoken")
    must_have_one_noun+=("oauthauthorizetoken")
    must_have_one_noun+=("oauthclient")
    must_have_one_noun+=("oauthclientauthorization")
    must_have_one_noun+=("persistentvolume")
    must_have_one_noun+=("persistentvolumeclaim")
    must_have_one_noun+=("petset")
    must_have_one_noun+=("pod")
    must_have_one_noun+=("podsecuritypolicy")
    must_have_one_noun+=("podtemplate")
    must_have_one_noun+=("policy")
    must_have_one_noun+=("policybinding")
    must_have_one_noun+=("project")
    must_have_one_noun+=("replicaset")
    must_have_one_noun+=("replicationcontroller")
    must_have_one_noun+=("resourcequota")
    must_have_one_noun+=("role")
    must_have_one_noun+=("role")
    must_have_one_noun+=("rolebinding")
    must_have_one_noun+=("rolebinding")
    must_have_one_noun+=("route")
    must_have_one_noun+=("scheduledjob")
    must_have_one_noun+=("secret")
    must_have_one_noun+=("securitycontextconstraints")
    must_have_one_noun+=("service")
    must_have_one_noun+=("serviceaccount")
    must_have_one_noun+=("storageclass")
    must_have_one_noun+=("template")
    must_have_one_noun+=("thirdpartyresource")
    must_have_one_noun+=("thirdpartyresourcedata")
    must_have_one_noun+=("user")
    must_have_one_noun+=("useridentitymapping")
    noun_aliases=()
    noun_aliases+=("appliedclusterresourcequotas")
    noun_aliases+=("buildconfigs")
    noun_aliases+=("builds")
    noun_aliases+=("certificatesigningrequests")
    noun_aliases+=("clusternetworks")
    noun_aliases+=("clusterpolicies")
    noun_aliases+=("clusterpolicybindings")
    noun_aliases+=("clusterresourcequotas")
    noun_aliases+=("clusterrolebindings")
    noun_aliases+=("clusterrolebindings")
    noun_aliases+=("clusterroles")
    noun_aliases+=("clusterroles")
    noun_aliases+=("clusters")
    noun_aliases+=("cm")
    noun_aliases+=("componentstatuses")
    noun_aliases+=("configmaps")
    noun_aliases+=("cs")
    noun_aliases+=("csr")
    noun_aliases+=("daemonsets")
    noun_aliases+=("deploy")
    noun_aliases+=("deploymentconfigs")
    noun_aliases+=("deployments")
    noun_aliases+=("ds")
    noun_aliases+=("egressnetworkpolicies")
    noun_aliases+=("endpoints")
    noun_aliases+=("ep")
    noun_aliases+=("ev")
    noun_aliases+=("events")
    noun_aliases+=("groups")
    noun_aliases+=("horizontalpodautoscalers")
    noun_aliases+=("hostsubnets")
    noun_aliases+=("hpa")
    noun_aliases+=("identities")
    noun_aliases+=("images")
    noun_aliases+=("imagestreamimages")
    noun_aliases+=("imagestreams")
    noun_aliases+=("imagestreamtags")
    noun_aliases+=("ing")
    noun_aliases+=("ingresses")
    noun_aliases+=("ispersonalsubjectaccessreviews")
    noun_aliases+=("jobs")
    noun_aliases+=("limitranges")
    noun_aliases+=("limits")
    noun_aliases+=("namespaces")
    noun_aliases+=("netnamespaces")
    noun_aliases+=("networkpolicies")
    noun_aliases+=("no")
    noun_aliases+=("nodes")
    noun_aliases+=("ns")
    noun_aliases+=("oauthaccesstokens")
    noun_aliases+=("oauthauthorizetokens")
    noun_aliases+=("oauthclientauthorizations")
    noun_aliases+=("oauthclients")
    noun_aliases+=("persistentvolumeclaims")
    noun_aliases+=("persistentvolumes")
    noun_aliases+=("petsets")
    noun_aliases+=("po")
    noun_aliases+=("pods")
    noun_aliases+=("podsecuritypolicies")
    noun_aliases+=("podtemplates")
    noun_aliases+=("policies")
    noun_aliases+=("policybindings")
    noun_aliases+=("projects")
    noun_aliases+=("pv")
    noun_aliases+=("pvc")
    noun_aliases+=("quota")
    noun_aliases+=("rc")
    noun_aliases+=("replicasets")
    noun_aliases+=("replicationcontrollers")
    noun_aliases+=("resourcequotas")
    noun_aliases+=("rolebindings")
    noun_aliases+=("rolebindings")
    noun_aliases+=("roles")
    noun_aliases+=("roles")
    noun_aliases+=("routes")
    noun_aliases+=("rs")
    noun_aliases+=("sa")
    noun_aliases+=("scheduledjobs")
    noun_aliases+=("secrets")
    noun_aliases+=("securitycontextconstraintses")
    noun_aliases+=("serviceaccounts")
    noun_aliases+=("services")
    noun_aliases+=("storageclasses")
    noun_aliases+=("svc")
    noun_aliases+=("templates")
    noun_aliases+=("thirdpartyresourcedatas")
    noun_aliases+=("thirdpartyresources")
    noun_aliases+=("useridentitymappings")
    noun_aliases+=("users")
}

_oc_policy_add-role-to-group()
{
    last_command="oc_policy_add-role-to-group"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--role-namespace=")
    local_nonpersistent_flags+=("--role-namespace=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_policy_add-role-to-user()
{
    last_command="oc_policy_add-role-to-user"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--role-namespace=")
    local_nonpersistent_flags+=("--role-namespace=")
    flags+=("--serviceaccount=")
    two_word_flags+=("-z")
    local_nonpersistent_flags+=("--serviceaccount=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_policy_can-i()
{
    last_command="oc_policy_can-i"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all-namespaces")
    local_nonpersistent_flags+=("--all-namespaces")
    flags+=("--groups=")
    local_nonpersistent_flags+=("--groups=")
    flags+=("--ignore-scopes")
    local_nonpersistent_flags+=("--ignore-scopes")
    flags+=("--list")
    local_nonpersistent_flags+=("--list")
    flags+=("--quiet")
    flags+=("-q")
    local_nonpersistent_flags+=("--quiet")
    flags+=("--scopes=")
    local_nonpersistent_flags+=("--scopes=")
    flags+=("--user=")
    local_nonpersistent_flags+=("--user=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_policy_remove-group()
{
    last_command="oc_policy_remove-group"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_policy_remove-role-from-group()
{
    last_command="oc_policy_remove-role-from-group"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--role-namespace=")
    local_nonpersistent_flags+=("--role-namespace=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_policy_remove-role-from-user()
{
    last_command="oc_policy_remove-role-from-user"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--role-namespace=")
    local_nonpersistent_flags+=("--role-namespace=")
    flags+=("--serviceaccount=")
    two_word_flags+=("-z")
    local_nonpersistent_flags+=("--serviceaccount=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_policy_remove-user()
{
    last_command="oc_policy_remove-user"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_policy_who-can()
{
    last_command="oc_policy_who-can"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all-namespaces")
    local_nonpersistent_flags+=("--all-namespaces")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_policy()
{
    last_command="oc_policy"
    commands=()
    commands+=("add-role-to-group")
    commands+=("add-role-to-user")
    commands+=("can-i")
    commands+=("remove-group")
    commands+=("remove-role-from-group")
    commands+=("remove-role-from-user")
    commands+=("remove-user")
    commands+=("who-can")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_port-forward()
{
    last_command="oc_port-forward"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--pod=")
    two_word_flags+=("-p")
    local_nonpersistent_flags+=("--pod=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_process()
{
    last_command="oc_process"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--labels=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--labels=")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--parameters")
    local_nonpersistent_flags+=("--parameters")
    flags+=("--raw")
    local_nonpersistent_flags+=("--raw")
    flags+=("--template=")
    two_word_flags+=("-t")
    local_nonpersistent_flags+=("--template=")
    flags+=("--value=")
    two_word_flags+=("-v")
    local_nonpersistent_flags+=("--value=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_project()
{
    last_command="oc_project"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--short")
    flags+=("-q")
    local_nonpersistent_flags+=("--short")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_projects()
{
    last_command="oc_projects"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--short")
    flags+=("-q")
    local_nonpersistent_flags+=("--short")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_proxy()
{
    last_command="oc_proxy"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--accept-hosts=")
    local_nonpersistent_flags+=("--accept-hosts=")
    flags+=("--accept-paths=")
    local_nonpersistent_flags+=("--accept-paths=")
    flags+=("--address=")
    local_nonpersistent_flags+=("--address=")
    flags+=("--api-prefix=")
    local_nonpersistent_flags+=("--api-prefix=")
    flags+=("--disable-filter")
    local_nonpersistent_flags+=("--disable-filter")
    flags+=("--port=")
    two_word_flags+=("-p")
    local_nonpersistent_flags+=("--port=")
    flags+=("--reject-methods=")
    local_nonpersistent_flags+=("--reject-methods=")
    flags+=("--reject-paths=")
    local_nonpersistent_flags+=("--reject-paths=")
    flags+=("--unix-socket=")
    two_word_flags+=("-u")
    local_nonpersistent_flags+=("--unix-socket=")
    flags+=("--www=")
    two_word_flags+=("-w")
    local_nonpersistent_flags+=("--www=")
    flags+=("--www-prefix=")
    two_word_flags+=("-P")
    local_nonpersistent_flags+=("--www-prefix=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_replace()
{
    last_command="oc_replace"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--cascade")
    local_nonpersistent_flags+=("--cascade")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--force")
    local_nonpersistent_flags+=("--force")
    flags+=("--grace-period=")
    local_nonpersistent_flags+=("--grace-period=")
    flags+=("--include-extended-apis")
    local_nonpersistent_flags+=("--include-extended-apis")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--record")
    local_nonpersistent_flags+=("--record")
    flags+=("--recursive")
    flags+=("-R")
    local_nonpersistent_flags+=("--recursive")
    flags+=("--save-config")
    local_nonpersistent_flags+=("--save-config")
    flags+=("--schema-cache-dir=")
    flags_with_completion+=("--schema-cache-dir")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--schema-cache-dir=")
    flags+=("--timeout=")
    local_nonpersistent_flags+=("--timeout=")
    flags+=("--validate")
    local_nonpersistent_flags+=("--validate")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_flag+=("--filename=")
    must_have_one_flag+=("-f")
    must_have_one_noun=()
    noun_aliases=()
}

_oc_rollback()
{
    last_command="oc_rollback"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--change-scaling-settings")
    local_nonpersistent_flags+=("--change-scaling-settings")
    flags+=("--change-strategy")
    local_nonpersistent_flags+=("--change-strategy")
    flags+=("--change-triggers")
    local_nonpersistent_flags+=("--change-triggers")
    flags+=("--dry-run")
    flags+=("-d")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    two_word_flags+=("-t")
    flags_with_completion+=("-t")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--to-version=")
    local_nonpersistent_flags+=("--to-version=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_rollout_history()
{
    last_command="oc_rollout_history"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--recursive")
    flags+=("-R")
    local_nonpersistent_flags+=("--recursive")
    flags+=("--revision=")
    local_nonpersistent_flags+=("--revision=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    must_have_one_noun+=("deployment")
    must_have_one_noun+=("deploymentconfig")
    noun_aliases=()
    noun_aliases+=("deploy")
    noun_aliases+=("deployments")
}

_oc_rollout_latest()
{
    last_command="oc_rollout_latest"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--again")
    local_nonpersistent_flags+=("--again")
    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    must_have_one_noun+=("deploymentconfig")
    noun_aliases=()
}

_oc_rollout_pause()
{
    last_command="oc_rollout_pause"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--recursive")
    flags+=("-R")
    local_nonpersistent_flags+=("--recursive")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    must_have_one_noun+=("deployment")
    must_have_one_noun+=("deploymentconfig")
    noun_aliases=()
    noun_aliases+=("deploy")
    noun_aliases+=("deployments")
}

_oc_rollout_resume()
{
    last_command="oc_rollout_resume"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--recursive")
    flags+=("-R")
    local_nonpersistent_flags+=("--recursive")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    must_have_one_noun+=("deployment")
    must_have_one_noun+=("deploymentconfig")
    noun_aliases=()
    noun_aliases+=("deploy")
    noun_aliases+=("deployments")
}

_oc_rollout_status()
{
    last_command="oc_rollout_status"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--recursive")
    flags+=("-R")
    local_nonpersistent_flags+=("--recursive")
    flags+=("--revision=")
    local_nonpersistent_flags+=("--revision=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    must_have_one_noun+=("deployment")
    noun_aliases=()
    noun_aliases+=("deploy")
    noun_aliases+=("deployments")
}

_oc_rollout_undo()
{
    last_command="oc_rollout_undo"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--recursive")
    flags+=("-R")
    local_nonpersistent_flags+=("--recursive")
    flags+=("--to-revision=")
    local_nonpersistent_flags+=("--to-revision=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    must_have_one_noun+=("deployment")
    must_have_one_noun+=("deploymentconfig")
    noun_aliases=()
    noun_aliases+=("deploy")
    noun_aliases+=("deployments")
}

_oc_rollout()
{
    last_command="oc_rollout"
    commands=()
    commands+=("history")
    commands+=("latest")
    commands+=("pause")
    commands+=("resume")
    commands+=("status")
    commands+=("undo")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_rsh()
{
    last_command="oc_rsh"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--container=")
    two_word_flags+=("-c")
    local_nonpersistent_flags+=("--container=")
    flags+=("--no-tty")
    flags+=("-T")
    local_nonpersistent_flags+=("--no-tty")
    flags+=("--shell=")
    local_nonpersistent_flags+=("--shell=")
    flags+=("--timeout=")
    local_nonpersistent_flags+=("--timeout=")
    flags+=("--tty")
    flags+=("-t")
    local_nonpersistent_flags+=("--tty")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_rsync()
{
    last_command="oc_rsync"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--container=")
    two_word_flags+=("-c")
    local_nonpersistent_flags+=("--container=")
    flags+=("--delete")
    local_nonpersistent_flags+=("--delete")
    flags+=("--exclude=")
    local_nonpersistent_flags+=("--exclude=")
    flags+=("--include=")
    local_nonpersistent_flags+=("--include=")
    flags+=("--no-perms")
    local_nonpersistent_flags+=("--no-perms")
    flags+=("--progress")
    local_nonpersistent_flags+=("--progress")
    flags+=("--quiet")
    flags+=("-q")
    local_nonpersistent_flags+=("--quiet")
    flags+=("--strategy=")
    local_nonpersistent_flags+=("--strategy=")
    flags+=("--watch")
    flags+=("-w")
    local_nonpersistent_flags+=("--watch")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_run()
{
    last_command="oc_run"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--attach")
    local_nonpersistent_flags+=("--attach")
    flags+=("--command")
    local_nonpersistent_flags+=("--command")
    flags+=("--dry-run")
    local_nonpersistent_flags+=("--dry-run")
    flags+=("--env=")
    local_nonpersistent_flags+=("--env=")
    flags+=("--expose")
    local_nonpersistent_flags+=("--expose")
    flags+=("--generator=")
    local_nonpersistent_flags+=("--generator=")
    flags+=("--hostport=")
    local_nonpersistent_flags+=("--hostport=")
    flags+=("--image=")
    local_nonpersistent_flags+=("--image=")
    flags+=("--image-pull-policy=")
    local_nonpersistent_flags+=("--image-pull-policy=")
    flags+=("--include-extended-apis")
    local_nonpersistent_flags+=("--include-extended-apis")
    flags+=("--labels=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--labels=")
    flags+=("--leave-stdin-open")
    local_nonpersistent_flags+=("--leave-stdin-open")
    flags+=("--limits=")
    local_nonpersistent_flags+=("--limits=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--overrides=")
    local_nonpersistent_flags+=("--overrides=")
    flags+=("--port=")
    local_nonpersistent_flags+=("--port=")
    flags+=("--quiet")
    local_nonpersistent_flags+=("--quiet")
    flags+=("--record")
    local_nonpersistent_flags+=("--record")
    flags+=("--replicas=")
    two_word_flags+=("-r")
    local_nonpersistent_flags+=("--replicas=")
    flags+=("--requests=")
    local_nonpersistent_flags+=("--requests=")
    flags+=("--restart=")
    local_nonpersistent_flags+=("--restart=")
    flags+=("--rm")
    local_nonpersistent_flags+=("--rm")
    flags+=("--save-config")
    local_nonpersistent_flags+=("--save-config")
    flags+=("--schedule=")
    local_nonpersistent_flags+=("--schedule=")
    flags+=("--service-generator=")
    local_nonpersistent_flags+=("--service-generator=")
    flags+=("--service-overrides=")
    local_nonpersistent_flags+=("--service-overrides=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--stdin")
    flags+=("-i")
    local_nonpersistent_flags+=("--stdin")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--tty")
    flags+=("-t")
    local_nonpersistent_flags+=("--tty")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_flag+=("--image=")
    must_have_one_noun=()
    noun_aliases=()
}

_oc_scale()
{
    last_command="oc_scale"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--current-replicas=")
    local_nonpersistent_flags+=("--current-replicas=")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--include-extended-apis")
    local_nonpersistent_flags+=("--include-extended-apis")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--record")
    local_nonpersistent_flags+=("--record")
    flags+=("--recursive")
    flags+=("-R")
    local_nonpersistent_flags+=("--recursive")
    flags+=("--replicas=")
    local_nonpersistent_flags+=("--replicas=")
    flags+=("--resource-version=")
    local_nonpersistent_flags+=("--resource-version=")
    flags+=("--timeout=")
    local_nonpersistent_flags+=("--timeout=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_flag+=("--replicas=")
    must_have_one_noun=()
    must_have_one_noun+=("deployment")
    must_have_one_noun+=("deploymentconfig")
    must_have_one_noun+=("job")
    must_have_one_noun+=("replicaset")
    must_have_one_noun+=("replicationcontroller")
    noun_aliases=()
    noun_aliases+=("deploy")
    noun_aliases+=("deployments")
    noun_aliases+=("jobs")
    noun_aliases+=("rc")
    noun_aliases+=("replicasets")
    noun_aliases+=("replicationcontrollers")
    noun_aliases+=("rs")
}

_oc_secrets_add()
{
    last_command="oc_secrets_add"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--for=")
    local_nonpersistent_flags+=("--for=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_secrets_link()
{
    last_command="oc_secrets_link"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--for=")
    local_nonpersistent_flags+=("--for=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_secrets_new()
{
    last_command="oc_secrets_new"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--confirm")
    local_nonpersistent_flags+=("--confirm")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--quiet")
    flags+=("-q")
    local_nonpersistent_flags+=("--quiet")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--type=")
    local_nonpersistent_flags+=("--type=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_secrets_new-basicauth()
{
    last_command="oc_secrets_new-basicauth"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--ca-cert=")
    flags_with_completion+=("--ca-cert")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--ca-cert=")
    flags+=("--gitconfig=")
    flags_with_completion+=("--gitconfig")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--gitconfig=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--password=")
    local_nonpersistent_flags+=("--password=")
    flags+=("--prompt")
    local_nonpersistent_flags+=("--prompt")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--username=")
    local_nonpersistent_flags+=("--username=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_secrets_new-dockercfg()
{
    last_command="oc_secrets_new-dockercfg"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--docker-email=")
    local_nonpersistent_flags+=("--docker-email=")
    flags+=("--docker-password=")
    local_nonpersistent_flags+=("--docker-password=")
    flags+=("--docker-server=")
    local_nonpersistent_flags+=("--docker-server=")
    flags+=("--docker-username=")
    local_nonpersistent_flags+=("--docker-username=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_secrets_new-sshauth()
{
    last_command="oc_secrets_new-sshauth"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--ca-cert=")
    flags_with_completion+=("--ca-cert")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--ca-cert=")
    flags+=("--gitconfig=")
    flags_with_completion+=("--gitconfig")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--gitconfig=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--ssh-privatekey=")
    flags_with_completion+=("--ssh-privatekey")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--ssh-privatekey=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_secrets_unlink()
{
    last_command="oc_secrets_unlink"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_secrets()
{
    last_command="oc_secrets"
    commands=()
    commands+=("add")
    commands+=("link")
    commands+=("new")
    commands+=("new-basicauth")
    commands+=("new-dockercfg")
    commands+=("new-sshauth")
    commands+=("unlink")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_serviceaccounts_get-token()
{
    last_command="oc_serviceaccounts_get-token"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_serviceaccounts_new-token()
{
    last_command="oc_serviceaccounts_new-token"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--labels=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--labels=")
    flags+=("--timeout=")
    local_nonpersistent_flags+=("--timeout=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_serviceaccounts()
{
    last_command="oc_serviceaccounts"
    commands=()
    commands+=("get-token")
    commands+=("new-token")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_set_build-hook()
{
    last_command="oc_set_build-hook"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all")
    local_nonpersistent_flags+=("--all")
    flags+=("--command")
    local_nonpersistent_flags+=("--command")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--post-commit")
    local_nonpersistent_flags+=("--post-commit")
    flags+=("--remove")
    local_nonpersistent_flags+=("--remove")
    flags+=("--script=")
    local_nonpersistent_flags+=("--script=")
    flags+=("--selector=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_set_build-secret()
{
    last_command="oc_set_build-secret"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all")
    local_nonpersistent_flags+=("--all")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--local")
    local_nonpersistent_flags+=("--local")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--pull")
    local_nonpersistent_flags+=("--pull")
    flags+=("--push")
    local_nonpersistent_flags+=("--push")
    flags+=("--remove")
    local_nonpersistent_flags+=("--remove")
    flags+=("--selector=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--source")
    local_nonpersistent_flags+=("--source")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_set_deployment-hook()
{
    last_command="oc_set_deployment-hook"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all")
    local_nonpersistent_flags+=("--all")
    flags+=("--container=")
    two_word_flags+=("-c")
    local_nonpersistent_flags+=("--container=")
    flags+=("--environment=")
    two_word_flags+=("-e")
    local_nonpersistent_flags+=("--environment=")
    flags+=("--failure-policy=")
    local_nonpersistent_flags+=("--failure-policy=")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--local")
    local_nonpersistent_flags+=("--local")
    flags+=("--mid")
    local_nonpersistent_flags+=("--mid")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--post")
    local_nonpersistent_flags+=("--post")
    flags+=("--pre")
    local_nonpersistent_flags+=("--pre")
    flags+=("--remove")
    local_nonpersistent_flags+=("--remove")
    flags+=("--selector=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--volumes=")
    two_word_flags+=("-v")
    local_nonpersistent_flags+=("--volumes=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_set_env()
{
    last_command="oc_set_env"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all")
    local_nonpersistent_flags+=("--all")
    flags+=("--containers=")
    two_word_flags+=("-c")
    local_nonpersistent_flags+=("--containers=")
    flags+=("--env=")
    two_word_flags+=("-e")
    local_nonpersistent_flags+=("--env=")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--from=")
    local_nonpersistent_flags+=("--from=")
    flags+=("--list")
    local_nonpersistent_flags+=("--list")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--overwrite")
    local_nonpersistent_flags+=("--overwrite")
    flags+=("--prefix=")
    local_nonpersistent_flags+=("--prefix=")
    flags+=("--resolve")
    local_nonpersistent_flags+=("--resolve")
    flags+=("--resource-version=")
    local_nonpersistent_flags+=("--resource-version=")
    flags+=("--selector=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_set_image()
{
    last_command="oc_set_image"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all")
    local_nonpersistent_flags+=("--all")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--local")
    local_nonpersistent_flags+=("--local")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--record")
    local_nonpersistent_flags+=("--record")
    flags+=("--recursive")
    flags+=("-R")
    local_nonpersistent_flags+=("--recursive")
    flags+=("--selector=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--source=")
    local_nonpersistent_flags+=("--source=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_set_probe()
{
    last_command="oc_set_probe"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all")
    local_nonpersistent_flags+=("--all")
    flags+=("--containers=")
    two_word_flags+=("-c")
    local_nonpersistent_flags+=("--containers=")
    flags+=("--failure-threshold=")
    local_nonpersistent_flags+=("--failure-threshold=")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--get-url=")
    local_nonpersistent_flags+=("--get-url=")
    flags+=("--initial-delay-seconds=")
    local_nonpersistent_flags+=("--initial-delay-seconds=")
    flags+=("--liveness")
    local_nonpersistent_flags+=("--liveness")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--open-tcp=")
    local_nonpersistent_flags+=("--open-tcp=")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--period-seconds=")
    local_nonpersistent_flags+=("--period-seconds=")
    flags+=("--readiness")
    local_nonpersistent_flags+=("--readiness")
    flags+=("--remove")
    local_nonpersistent_flags+=("--remove")
    flags+=("--selector=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--success-threshold=")
    local_nonpersistent_flags+=("--success-threshold=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--timeout-seconds=")
    local_nonpersistent_flags+=("--timeout-seconds=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_set_route-backends()
{
    last_command="oc_set_route-backends"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--adjust")
    local_nonpersistent_flags+=("--adjust")
    flags+=("--all")
    local_nonpersistent_flags+=("--all")
    flags+=("--equal")
    local_nonpersistent_flags+=("--equal")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--selector=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--zero")
    local_nonpersistent_flags+=("--zero")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_set_triggers()
{
    last_command="oc_set_triggers"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all")
    local_nonpersistent_flags+=("--all")
    flags+=("--auto")
    local_nonpersistent_flags+=("--auto")
    flags+=("--containers=")
    two_word_flags+=("-c")
    local_nonpersistent_flags+=("--containers=")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--from-config")
    local_nonpersistent_flags+=("--from-config")
    flags+=("--from-github")
    local_nonpersistent_flags+=("--from-github")
    flags+=("--from-image=")
    local_nonpersistent_flags+=("--from-image=")
    flags+=("--from-webhook")
    local_nonpersistent_flags+=("--from-webhook")
    flags+=("--from-webhook-allow-env")
    local_nonpersistent_flags+=("--from-webhook-allow-env")
    flags+=("--manual")
    local_nonpersistent_flags+=("--manual")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--remove")
    local_nonpersistent_flags+=("--remove")
    flags+=("--remove-all")
    local_nonpersistent_flags+=("--remove-all")
    flags+=("--selector=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_set_volumes()
{
    last_command="oc_set_volumes"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--add")
    local_nonpersistent_flags+=("--add")
    flags+=("--all")
    local_nonpersistent_flags+=("--all")
    flags+=("--claim-mode=")
    local_nonpersistent_flags+=("--claim-mode=")
    flags+=("--claim-name=")
    local_nonpersistent_flags+=("--claim-name=")
    flags+=("--claim-size=")
    local_nonpersistent_flags+=("--claim-size=")
    flags+=("--configmap-name=")
    local_nonpersistent_flags+=("--configmap-name=")
    flags+=("--confirm")
    local_nonpersistent_flags+=("--confirm")
    flags+=("--containers=")
    two_word_flags+=("-c")
    local_nonpersistent_flags+=("--containers=")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--mount-path=")
    two_word_flags+=("-m")
    local_nonpersistent_flags+=("--mount-path=")
    flags+=("--name=")
    local_nonpersistent_flags+=("--name=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--overwrite")
    local_nonpersistent_flags+=("--overwrite")
    flags+=("--path=")
    local_nonpersistent_flags+=("--path=")
    flags+=("--remove")
    local_nonpersistent_flags+=("--remove")
    flags+=("--secret-name=")
    local_nonpersistent_flags+=("--secret-name=")
    flags+=("--selector=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--source=")
    local_nonpersistent_flags+=("--source=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--type=")
    two_word_flags+=("-t")
    local_nonpersistent_flags+=("--type=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_set()
{
    last_command="oc_set"
    commands=()
    commands+=("build-hook")
    commands+=("build-secret")
    commands+=("deployment-hook")
    commands+=("env")
    commands+=("image")
    commands+=("probe")
    commands+=("route-backends")
    commands+=("triggers")
    commands+=("volumes")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_start-build()
{
    last_command="oc_start-build"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--build-loglevel=")
    local_nonpersistent_flags+=("--build-loglevel=")
    flags+=("--commit=")
    local_nonpersistent_flags+=("--commit=")
    flags+=("--env=")
    two_word_flags+=("-e")
    local_nonpersistent_flags+=("--env=")
    flags+=("--follow")
    flags+=("-F")
    local_nonpersistent_flags+=("--follow")
    flags+=("--from-build=")
    local_nonpersistent_flags+=("--from-build=")
    flags+=("--from-dir=")
    local_nonpersistent_flags+=("--from-dir=")
    flags+=("--from-file=")
    local_nonpersistent_flags+=("--from-file=")
    flags+=("--from-repo=")
    local_nonpersistent_flags+=("--from-repo=")
    flags+=("--from-webhook=")
    local_nonpersistent_flags+=("--from-webhook=")
    flags+=("--git-post-receive=")
    local_nonpersistent_flags+=("--git-post-receive=")
    flags+=("--git-repository=")
    local_nonpersistent_flags+=("--git-repository=")
    flags+=("--list-webhooks=")
    local_nonpersistent_flags+=("--list-webhooks=")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--wait")
    flags+=("-w")
    local_nonpersistent_flags+=("--wait")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_status()
{
    last_command="oc_status"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--all-namespaces")
    local_nonpersistent_flags+=("--all-namespaces")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--verbose")
    flags+=("-v")
    local_nonpersistent_flags+=("--verbose")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_tag()
{
    last_command="oc_tag"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--alias")
    local_nonpersistent_flags+=("--alias")
    flags+=("--delete")
    flags+=("-d")
    local_nonpersistent_flags+=("--delete")
    flags+=("--insecure")
    local_nonpersistent_flags+=("--insecure")
    flags+=("--reference")
    local_nonpersistent_flags+=("--reference")
    flags+=("--scheduled")
    local_nonpersistent_flags+=("--scheduled")
    flags+=("--source=")
    local_nonpersistent_flags+=("--source=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_types()
{
    last_command="oc_types"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_version()
{
    last_command="oc_version"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_volumes()
{
    last_command="oc_volumes"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--add")
    local_nonpersistent_flags+=("--add")
    flags+=("--all")
    local_nonpersistent_flags+=("--all")
    flags+=("--claim-mode=")
    local_nonpersistent_flags+=("--claim-mode=")
    flags+=("--claim-name=")
    local_nonpersistent_flags+=("--claim-name=")
    flags+=("--claim-size=")
    local_nonpersistent_flags+=("--claim-size=")
    flags+=("--configmap-name=")
    local_nonpersistent_flags+=("--configmap-name=")
    flags+=("--confirm")
    local_nonpersistent_flags+=("--confirm")
    flags+=("--containers=")
    two_word_flags+=("-c")
    local_nonpersistent_flags+=("--containers=")
    flags+=("--filename=")
    flags_with_completion+=("--filename")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    two_word_flags+=("-f")
    flags_with_completion+=("-f")
    flags_completion+=("__handle_filename_extension_flag yaml|yml|json")
    local_nonpersistent_flags+=("--filename=")
    flags+=("--mount-path=")
    two_word_flags+=("-m")
    local_nonpersistent_flags+=("--mount-path=")
    flags+=("--name=")
    local_nonpersistent_flags+=("--name=")
    flags+=("--no-headers")
    local_nonpersistent_flags+=("--no-headers")
    flags+=("--output=")
    two_word_flags+=("-o")
    local_nonpersistent_flags+=("--output=")
    flags+=("--output-version=")
    local_nonpersistent_flags+=("--output-version=")
    flags+=("--overwrite")
    local_nonpersistent_flags+=("--overwrite")
    flags+=("--path=")
    local_nonpersistent_flags+=("--path=")
    flags+=("--remove")
    local_nonpersistent_flags+=("--remove")
    flags+=("--secret-name=")
    local_nonpersistent_flags+=("--secret-name=")
    flags+=("--selector=")
    two_word_flags+=("-l")
    local_nonpersistent_flags+=("--selector=")
    flags+=("--show-all")
    flags+=("-a")
    local_nonpersistent_flags+=("--show-all")
    flags+=("--show-labels")
    local_nonpersistent_flags+=("--show-labels")
    flags+=("--sort-by=")
    local_nonpersistent_flags+=("--sort-by=")
    flags+=("--source=")
    local_nonpersistent_flags+=("--source=")
    flags+=("--template=")
    flags_with_completion+=("--template")
    flags_completion+=("_filedir")
    local_nonpersistent_flags+=("--template=")
    flags+=("--type=")
    two_word_flags+=("-t")
    local_nonpersistent_flags+=("--type=")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc_whoami()
{
    last_command="oc_whoami"
    commands=()

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--show-context")
    flags+=("-c")
    local_nonpersistent_flags+=("--show-context")
    flags+=("--show-server")
    local_nonpersistent_flags+=("--show-server")
    flags+=("--show-token")
    flags+=("-t")
    local_nonpersistent_flags+=("--show-token")
    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

_oc()
{
    last_command="oc"
    commands=()
    commands+=("adm")
    commands+=("annotate")
    commands+=("apply")
    commands+=("attach")
    commands+=("autoscale")
    commands+=("cancel-build")
    commands+=("cluster")
    commands+=("completion")
    commands+=("config")
    commands+=("convert")
    commands+=("create")
    commands+=("debug")
    commands+=("delete")
    commands+=("deploy")
    commands+=("describe")
    commands+=("edit")
    commands+=("env")
    commands+=("ex")
    commands+=("exec")
    commands+=("explain")
    commands+=("export")
    commands+=("expose")
    commands+=("extract")
    commands+=("get")
    commands+=("idle")
    commands+=("import")
    commands+=("import-image")
    commands+=("label")
    commands+=("login")
    commands+=("logout")
    commands+=("logs")
    commands+=("new-app")
    commands+=("new-build")
    commands+=("new-project")
    commands+=("observe")
    commands+=("options")
    commands+=("patch")
    commands+=("policy")
    commands+=("port-forward")
    commands+=("process")
    commands+=("project")
    commands+=("projects")
    commands+=("proxy")
    commands+=("replace")
    commands+=("rollback")
    commands+=("rollout")
    commands+=("rsh")
    commands+=("rsync")
    commands+=("run")
    commands+=("scale")
    commands+=("secrets")
    commands+=("serviceaccounts")
    commands+=("set")
    commands+=("start-build")
    commands+=("status")
    commands+=("tag")
    commands+=("types")
    commands+=("version")
    commands+=("volumes")
    commands+=("whoami")

    flags=()
    two_word_flags=()
    local_nonpersistent_flags=()
    flags_with_completion=()
    flags_completion=()

    flags+=("--as=")
    flags+=("--certificate-authority=")
    flags_with_completion+=("--certificate-authority")
    flags_completion+=("_filedir")
    flags+=("--client-certificate=")
    flags_with_completion+=("--client-certificate")
    flags_completion+=("_filedir")
    flags+=("--client-key=")
    flags_with_completion+=("--client-key")
    flags_completion+=("_filedir")
    flags+=("--cluster=")
    flags+=("--config=")
    flags_with_completion+=("--config")
    flags_completion+=("_filedir")
    flags+=("--context=")
    flags+=("--insecure-skip-tls-verify")
    flags+=("--log-flush-frequency=")
    flags+=("--loglevel=")
    flags+=("--logspec=")
    flags+=("--match-server-version")
    flags+=("--namespace=")
    two_word_flags+=("-n")
    flags+=("--request-timeout=")
    flags+=("--server=")
    flags+=("--token=")
    flags+=("--user=")

    must_have_one_flag=()
    must_have_one_noun=()
    noun_aliases=()
}

__start_oc()
{
    local cur prev words cword
    declare -A flaghash 2>/dev/null || :
    if declare -F _init_completion >/dev/null 2>&1; then
        _init_completion -s || return
    else
        __my_init_completion -n "=" || return
    fi

    local c=0
    local flags=()
    local two_word_flags=()
    local local_nonpersistent_flags=()
    local flags_with_completion=()
    local flags_completion=()
    local commands=("oc")
    local must_have_one_flag=()
    local must_have_one_noun=()
    local last_command
    local nouns=()

    __handle_word
}

if [[ $(type -t compopt) = "builtin" ]]; then
    complete -o default -F __start_oc oc
else
    complete -o default -o nospace -F __start_oc oc
fi

# ex: ts=4 sw=4 et filetype=sh

BASH_COMPLETION_EOF
}

__kubectl_bash_source <(__kubectl_convert_bash_to_zsh)