#compdef oct

autoload -U is-at-least

_oct() {
    typeset -A opt_args
    typeset -a _arguments_options
    local ret=1

    if is-at-least 5.2; then
        _arguments_options=(-s -S -C)
    else
        _arguments_options=(-s -C)
    fi

    local context curcontext="$curcontext" state line
    _arguments "${_arguments_options[@]}" \
'--output-format=[Produce output in the chosen format]:OUTPUT_FORMAT:(json text yaml)' \
'--output-version=[Pick output version to use, for non-textual formats]:OUTPUT_VERSION: ' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
":: :_oct_commands" \
"*::: :->oct" \
&& ret=0
    case $state in
    (oct)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:oct-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" \
'-i[Only show card idents]' \
'--idents-only[Only show card idents]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" \
'-c+[Identifier of the card to use]:card ident: ' \
'--card=[Identifier of the card to use]:card ident: ' \
'-v[Use verbose output]' \
'--verbose[Use verbose output]' \
'-K[Print public key material for each key slot]' \
'--public-key-material[Print public key material for each key slot]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(info)
_arguments "${_arguments_options[@]}" \
'-c+[Identifier of the card to use]:card ident: ' \
'--card=[Identifier of the card to use]:card ident: ' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(ssh)
_arguments "${_arguments_options[@]}" \
'-c+[Identifier of the card to use]:card ident: ' \
'--card=[Identifier of the card to use]:card ident: ' \
'--key-only[Only print the ssh public key]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(pubkey)
_arguments "${_arguments_options[@]}" \
'-c+[Identifier of the card to use]:card ident: ' \
'--card=[Identifier of the card to use]:card ident: ' \
'-p+[Optionally, get User PIN from a file]:User PIN file:_files' \
'--user-pin=[Optionally, get User PIN from a file]:User PIN file:_files' \
'*-u+[User ID to add to the exported certificate representation]:User ID: ' \
'*--userid=[User ID to add to the exported certificate representation]:User ID: ' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(admin)
_arguments "${_arguments_options[@]}" \
'-c+[Identifier of the card to use]:card ident: ' \
'--card=[Identifier of the card to use]:card ident: ' \
'-P+[Optionally, get Admin PIN from a file]:Admin PIN file:_files' \
'--admin-pin=[Optionally, get Admin PIN from a file]:Admin PIN file:_files' \
'-h[Print help]' \
'--help[Print help]' \
":: :_oct__admin_commands" \
"*::: :->admin" \
&& ret=0

    case $state in
    (admin)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:oct-admin-command-$line[1]:"
        case $line[1] in
            (name)
_arguments "${_arguments_options[@]}" \
'-h[Print help]' \
'--help[Print help]' \
':name -- cardholder name to set on the card:' \
&& ret=0
;;
(url)
_arguments "${_arguments_options[@]}" \
'-h[Print help]' \
'--help[Print help]' \
':url -- URL that provides the certificate for the key material on this card:' \
&& ret=0
;;
(import)
_arguments "${_arguments_options[@]}" \
'-s+[Optionally, select the subkey to import in the SIG slot]:SIG subkey fingerprint: ' \
'--sig-fp=[Optionally, select the subkey to import in the SIG slot]:SIG subkey fingerprint: ' \
'-d+[Optionally, select the subkey to import in the DEC slot]:DEC subkey fingerprint: ' \
'--dec-fp=[Optionally, select the subkey to import in the DEC slot]:DEC subkey fingerprint: ' \
'-a+[Optionally, select the subkey to import in the AUT slot]:AUT subkey fingerprint: ' \
'--aut-fp=[Optionally, select the subkey to import in the AUT slot]:AUT subkey fingerprint: ' \
'*--key-passphrase=[Optionally, provide a passphrase for encrypted secret key material in a file]:KEY_PASSPHRASE:_files' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':keyfile -- File that contains the PGP private key:_files' \
&& ret=0
;;
(generate)
_arguments "${_arguments_options[@]}" \
'-o+[Output file]:output:_files' \
'--output=[Output file]:output:_files' \
'*-u+[User ID to add to the exported certificate representation]:User ID: ' \
'*--userid=[User ID to add to the exported certificate representation]:User ID: ' \
'-p+[Optionally, get User PIN from a file]:User PIN file:_files' \
'--user-pin=[Optionally, get User PIN from a file]:User PIN file:_files' \
'--no-dec[Do not create a key in the DEC slot]' \
'--no-aut[Do not create a key in the AUT slot]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'::algorithm -- Choose the algorithm for the key material to generate on the card.:(rsa2048 rsa3072 rsa4096 nistp256 nistp384 nistp521 cv25519)' \
&& ret=0
;;
(touch)
_arguments "${_arguments_options[@]}" \
'-k+[Key slot to set the touch policy for]:Key slot:(SIG DEC AUT ATT)' \
'--key=[Key slot to set the touch policy for]:Key slot:(SIG DEC AUT ATT)' \
'-p+[Touch policy to set on this key slot]:Policy:(Off On Fixed Cached Cached-Fixed)' \
'--policy=[Touch policy to set on this key slot]:Policy:(Off On Fixed Cached Cached-Fixed)' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
":: :_oct__admin__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:oct-admin-help-command-$line[1]:"
        case $line[1] in
            (name)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(url)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(import)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(generate)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(touch)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(pin)
_arguments "${_arguments_options[@]}" \
'-c+[Identifier of the card to use]:card ident: ' \
'--card=[Identifier of the card to use]:card ident: ' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_oct__pin_commands" \
"*::: :->pin" \
&& ret=0

    case $state in
    (pin)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:oct-pin-command-$line[1]:"
        case $line[1] in
            (set-user)
_arguments "${_arguments_options[@]}" \
'-p+[Optionally, get old User PIN from a file]:User PIN file old:_files' \
'--user-pin-old=[Optionally, get old User PIN from a file]:User PIN file old:_files' \
'-q+[Optionally, get new User PIN from a file]:User PIN file new:_files' \
'--user-pin-new=[Optionally, get new User PIN from a file]:User PIN file new:_files' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(set-admin)
_arguments "${_arguments_options[@]}" \
'-P+[Optionally, get old Admin PIN from a file]:Admin PIN file old:_files' \
'--admin-pin-old=[Optionally, get old Admin PIN from a file]:Admin PIN file old:_files' \
'-Q+[Optionally, get new Admin PIN from a file]:Admin PIN file new:_files' \
'--admin-pin-new=[Optionally, get new Admin PIN from a file]:Admin PIN file new:_files' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(reset-user)
_arguments "${_arguments_options[@]}" \
'-P+[Optionally, get Admin PIN from a file]:Admin PIN file:_files' \
'--admin-pin=[Optionally, get Admin PIN from a file]:Admin PIN file:_files' \
'-p+[Optionally, get new User PIN from a file]:User PIN file new:_files' \
'--user-pin-new=[Optionally, get new User PIN from a file]:User PIN file new:_files' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(reset-user-rc)
_arguments "${_arguments_options[@]}" \
'-r+[Optionally, get the Resetting Code from a file]:Resetting Code file:_files' \
'--reset-code=[Optionally, get the Resetting Code from a file]:Resetting Code file:_files' \
'-p+[Optionally, get new User PIN from a file]:User PIN file new:_files' \
'--user-pin-new=[Optionally, get new User PIN from a file]:User PIN file new:_files' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(set-reset)
_arguments "${_arguments_options[@]}" \
'-P+[Optionally, get Admin PIN from a file]:Admin PIN file:_files' \
'--admin-pin=[Optionally, get Admin PIN from a file]:Admin PIN file:_files' \
'-r+[Optionally, get the Resetting Code from a file]:Resetting Code file:_files' \
'--reset-code=[Optionally, get the Resetting Code from a file]:Resetting Code file:_files' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
":: :_oct__pin__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:oct-pin-help-command-$line[1]:"
        case $line[1] in
            (set-user)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(set-admin)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(reset-user)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(reset-user-rc)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(set-reset)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(decrypt)
_arguments "${_arguments_options[@]}" \
'-c+[Identifier of the card to use]:card ident: ' \
'--card=[Identifier of the card to use]:card ident: ' \
'-p+[Optionally, get User PIN from a file]:User PIN file:_files' \
'--user-pin=[Optionally, get User PIN from a file]:User PIN file:_files' \
'-o+[Output file (stdout if unset)]:output:_files' \
'--output=[Output file (stdout if unset)]:output:_files' \
'-h[Print help]' \
'--help[Print help]' \
'::input -- Input file (stdin if unset):_files' \
&& ret=0
;;
(sign)
_arguments "${_arguments_options[@]}" \
'-c+[Identifier of the card to use]:card ident: ' \
'--card=[Identifier of the card to use]:card ident: ' \
'-p+[Optionally, get User PIN from a file]:User PIN file:_files' \
'--user-pin=[Optionally, get User PIN from a file]:User PIN file:_files' \
'-h[Print help]' \
'--help[Print help]' \
":: :_oct__sign_commands" \
"*::: :->sign" \
&& ret=0

    case $state in
    (sign)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:oct-sign-command-$line[1]:"
        case $line[1] in
            (detached)
_arguments "${_arguments_options[@]}" \
'-o+[Output file (stdout if unset)]:output:_files' \
'--output=[Output file (stdout if unset)]:output:_files' \
'-h[Print help]' \
'--help[Print help]' \
'::input -- Input file (stdin if unset):_files' \
&& ret=0
;;
(cleartext)
_arguments "${_arguments_options[@]}" \
'-o+[Output file (stdout if unset)]:output:_files' \
'--output=[Output file (stdout if unset)]:output:_files' \
'-h[Print help]' \
'--help[Print help]' \
'::input -- Input file (stdin if unset):_files' \
&& ret=0
;;
(inline)
_arguments "${_arguments_options[@]}" \
'-o+[Output file (stdout if unset)]:output:_files' \
'--output=[Output file (stdout if unset)]:output:_files' \
'-h[Print help]' \
'--help[Print help]' \
'::input -- Input file (stdin if unset):_files' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
":: :_oct__sign__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:oct-sign-help-command-$line[1]:"
        case $line[1] in
            (detached)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(cleartext)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(inline)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(attestation)
_arguments "${_arguments_options[@]}" \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_oct__attestation_commands" \
"*::: :->attestation" \
&& ret=0

    case $state in
    (attestation)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:oct-attestation-command-$line[1]:"
        case $line[1] in
            (cert)
_arguments "${_arguments_options[@]}" \
'-c+[Identifier of the card to use]:card ident: ' \
'--card=[Identifier of the card to use]:card ident: ' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(generate)
_arguments "${_arguments_options[@]}" \
'-c+[Identifier of the card to use]:card ident: ' \
'--card=[Identifier of the card to use]:card ident: ' \
'-k+[Key slot to use]:Key slot:(SIG DEC AUT)' \
'--key=[Key slot to use]:Key slot:(SIG DEC AUT)' \
'-p+[Optionally, get User PIN from a file]:User PIN file:_files' \
'--user-pin=[Optionally, get User PIN from a file]:User PIN file:_files' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(statement)
_arguments "${_arguments_options[@]}" \
'-c+[Identifier of the card to reset]:card ident: ' \
'--card=[Identifier of the card to reset]:card ident: ' \
'-k+[Key slot to use]:Key slot:(SIG DEC AUT)' \
'--key=[Key slot to use]:Key slot:(SIG DEC AUT)' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
":: :_oct__attestation__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:oct-attestation-help-command-$line[1]:"
        case $line[1] in
            (cert)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(generate)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(statement)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(system)
_arguments "${_arguments_options[@]}" \
'-h[Print help]' \
'--help[Print help]' \
":: :_oct__system_commands" \
"*::: :->system" \
&& ret=0

    case $state in
    (system)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:oct-system-command-$line[1]:"
        case $line[1] in
            (factory-reset)
_arguments "${_arguments_options[@]}" \
'-c+[Identifier of the card to use]:card ident: ' \
'--card=[Identifier of the card to use]:card ident: ' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(set-identity)
_arguments "${_arguments_options[@]}" \
'-c+[Identifier of the card to use]:card ident: ' \
'--card=[Identifier of the card to use]:card ident: ' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':identity -- Identity of the virtual card to activate:(0 1 2)' \
&& ret=0
;;
(activate-file)
_arguments "${_arguments_options[@]}" \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
":: :_oct__system__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:oct-system-help-command-$line[1]:"
        case $line[1] in
            (factory-reset)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(set-identity)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(activate-file)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(output-versions)
_arguments "${_arguments_options[@]}" \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
":: :_oct__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:oct-help-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(info)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(ssh)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(pubkey)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(admin)
_arguments "${_arguments_options[@]}" \
":: :_oct__help__admin_commands" \
"*::: :->admin" \
&& ret=0

    case $state in
    (admin)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:oct-help-admin-command-$line[1]:"
        case $line[1] in
            (name)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(url)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(import)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(generate)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(touch)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
        esac
    ;;
esac
;;
(pin)
_arguments "${_arguments_options[@]}" \
":: :_oct__help__pin_commands" \
"*::: :->pin" \
&& ret=0

    case $state in
    (pin)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:oct-help-pin-command-$line[1]:"
        case $line[1] in
            (set-user)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(set-admin)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(reset-user)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(reset-user-rc)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(set-reset)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
        esac
    ;;
esac
;;
(decrypt)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(sign)
_arguments "${_arguments_options[@]}" \
":: :_oct__help__sign_commands" \
"*::: :->sign" \
&& ret=0

    case $state in
    (sign)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:oct-help-sign-command-$line[1]:"
        case $line[1] in
            (detached)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(cleartext)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(inline)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
        esac
    ;;
esac
;;
(attestation)
_arguments "${_arguments_options[@]}" \
":: :_oct__help__attestation_commands" \
"*::: :->attestation" \
&& ret=0

    case $state in
    (attestation)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:oct-help-attestation-command-$line[1]:"
        case $line[1] in
            (cert)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(generate)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(statement)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
        esac
    ;;
esac
;;
(system)
_arguments "${_arguments_options[@]}" \
":: :_oct__help__system_commands" \
"*::: :->system" \
&& ret=0

    case $state in
    (system)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:oct-help-system-command-$line[1]:"
        case $line[1] in
            (factory-reset)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(set-identity)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(activate-file)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
        esac
    ;;
esac
;;
(output-versions)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
}

(( $+functions[_oct_commands] )) ||
_oct_commands() {
    local commands; commands=(
'list:Enumerate available OpenPGP cards' \
'status:Show information about the data on a card' \
'info:Show technical details about a card' \
'ssh:Show a card'\''s authentication key as an SSH public key' \
'pubkey:Export the key data on a card as an OpenPGP public key' \
'admin:Administer data on a card (including keys and metadata)' \
'pin:PIN management (change PINs, reset blocked PINs)' \
'decrypt:Decrypt data using a card' \
'sign:Sign data using a card' \
'attestation:Attestation management (Yubico only)' \
'system:Initialization and similar functionality' \
'output-versions:Show supported output format versions' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'oct commands' commands "$@"
}
(( $+functions[_oct__help__system__activate-file_commands] )) ||
_oct__help__system__activate-file_commands() {
    local commands; commands=()
    _describe -t commands 'oct help system activate-file commands' commands "$@"
}
(( $+functions[_oct__system__activate-file_commands] )) ||
_oct__system__activate-file_commands() {
    local commands; commands=()
    _describe -t commands 'oct system activate-file commands' commands "$@"
}
(( $+functions[_oct__system__help__activate-file_commands] )) ||
_oct__system__help__activate-file_commands() {
    local commands; commands=()
    _describe -t commands 'oct system help activate-file commands' commands "$@"
}
(( $+functions[_oct__admin_commands] )) ||
_oct__admin_commands() {
    local commands; commands=(
'name:Set cardholder name' \
'url:Set certificate URL' \
'import:Import a Key onto the card' \
'generate:Generate a Key on the card' \
'touch:Set the card'\''s touch policy (if supported)' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'oct admin commands' commands "$@"
}
(( $+functions[_oct__help__admin_commands] )) ||
_oct__help__admin_commands() {
    local commands; commands=(
'name:Set cardholder name' \
'url:Set certificate URL' \
'import:Import a Key onto the card' \
'generate:Generate a Key on the card' \
'touch:Set the card'\''s touch policy (if supported)' \
    )
    _describe -t commands 'oct help admin commands' commands "$@"
}
(( $+functions[_oct__attestation_commands] )) ||
_oct__attestation_commands() {
    local commands; commands=(
'cert:Print the card'\''s attestation certificate' \
'generate:Generate attestation statement for one of the key slots on the card' \
'statement:Print the attestation statement for one of the key slots on the card' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'oct attestation commands' commands "$@"
}
(( $+functions[_oct__help__attestation_commands] )) ||
_oct__help__attestation_commands() {
    local commands; commands=(
'cert:Print the card'\''s attestation certificate' \
'generate:Generate attestation statement for one of the key slots on the card' \
'statement:Print the attestation statement for one of the key slots on the card' \
    )
    _describe -t commands 'oct help attestation commands' commands "$@"
}
(( $+functions[_oct__attestation__cert_commands] )) ||
_oct__attestation__cert_commands() {
    local commands; commands=()
    _describe -t commands 'oct attestation cert commands' commands "$@"
}
(( $+functions[_oct__attestation__help__cert_commands] )) ||
_oct__attestation__help__cert_commands() {
    local commands; commands=()
    _describe -t commands 'oct attestation help cert commands' commands "$@"
}
(( $+functions[_oct__help__attestation__cert_commands] )) ||
_oct__help__attestation__cert_commands() {
    local commands; commands=()
    _describe -t commands 'oct help attestation cert commands' commands "$@"
}
(( $+functions[_oct__help__sign__cleartext_commands] )) ||
_oct__help__sign__cleartext_commands() {
    local commands; commands=()
    _describe -t commands 'oct help sign cleartext commands' commands "$@"
}
(( $+functions[_oct__sign__cleartext_commands] )) ||
_oct__sign__cleartext_commands() {
    local commands; commands=()
    _describe -t commands 'oct sign cleartext commands' commands "$@"
}
(( $+functions[_oct__sign__help__cleartext_commands] )) ||
_oct__sign__help__cleartext_commands() {
    local commands; commands=()
    _describe -t commands 'oct sign help cleartext commands' commands "$@"
}
(( $+functions[_oct__decrypt_commands] )) ||
_oct__decrypt_commands() {
    local commands; commands=()
    _describe -t commands 'oct decrypt commands' commands "$@"
}
(( $+functions[_oct__help__decrypt_commands] )) ||
_oct__help__decrypt_commands() {
    local commands; commands=()
    _describe -t commands 'oct help decrypt commands' commands "$@"
}
(( $+functions[_oct__help__sign__detached_commands] )) ||
_oct__help__sign__detached_commands() {
    local commands; commands=()
    _describe -t commands 'oct help sign detached commands' commands "$@"
}
(( $+functions[_oct__sign__detached_commands] )) ||
_oct__sign__detached_commands() {
    local commands; commands=()
    _describe -t commands 'oct sign detached commands' commands "$@"
}
(( $+functions[_oct__sign__help__detached_commands] )) ||
_oct__sign__help__detached_commands() {
    local commands; commands=()
    _describe -t commands 'oct sign help detached commands' commands "$@"
}
(( $+functions[_oct__help__system__factory-reset_commands] )) ||
_oct__help__system__factory-reset_commands() {
    local commands; commands=()
    _describe -t commands 'oct help system factory-reset commands' commands "$@"
}
(( $+functions[_oct__system__factory-reset_commands] )) ||
_oct__system__factory-reset_commands() {
    local commands; commands=()
    _describe -t commands 'oct system factory-reset commands' commands "$@"
}
(( $+functions[_oct__system__help__factory-reset_commands] )) ||
_oct__system__help__factory-reset_commands() {
    local commands; commands=()
    _describe -t commands 'oct system help factory-reset commands' commands "$@"
}
(( $+functions[_oct__admin__generate_commands] )) ||
_oct__admin__generate_commands() {
    local commands; commands=()
    _describe -t commands 'oct admin generate commands' commands "$@"
}
(( $+functions[_oct__admin__help__generate_commands] )) ||
_oct__admin__help__generate_commands() {
    local commands; commands=()
    _describe -t commands 'oct admin help generate commands' commands "$@"
}
(( $+functions[_oct__attestation__generate_commands] )) ||
_oct__attestation__generate_commands() {
    local commands; commands=()
    _describe -t commands 'oct attestation generate commands' commands "$@"
}
(( $+functions[_oct__attestation__help__generate_commands] )) ||
_oct__attestation__help__generate_commands() {
    local commands; commands=()
    _describe -t commands 'oct attestation help generate commands' commands "$@"
}
(( $+functions[_oct__help__admin__generate_commands] )) ||
_oct__help__admin__generate_commands() {
    local commands; commands=()
    _describe -t commands 'oct help admin generate commands' commands "$@"
}
(( $+functions[_oct__help__attestation__generate_commands] )) ||
_oct__help__attestation__generate_commands() {
    local commands; commands=()
    _describe -t commands 'oct help attestation generate commands' commands "$@"
}
(( $+functions[_oct__admin__help_commands] )) ||
_oct__admin__help_commands() {
    local commands; commands=(
'name:Set cardholder name' \
'url:Set certificate URL' \
'import:Import a Key onto the card' \
'generate:Generate a Key on the card' \
'touch:Set the card'\''s touch policy (if supported)' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'oct admin help commands' commands "$@"
}
(( $+functions[_oct__admin__help__help_commands] )) ||
_oct__admin__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'oct admin help help commands' commands "$@"
}
(( $+functions[_oct__attestation__help_commands] )) ||
_oct__attestation__help_commands() {
    local commands; commands=(
'cert:Print the card'\''s attestation certificate' \
'generate:Generate attestation statement for one of the key slots on the card' \
'statement:Print the attestation statement for one of the key slots on the card' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'oct attestation help commands' commands "$@"
}
(( $+functions[_oct__attestation__help__help_commands] )) ||
_oct__attestation__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'oct attestation help help commands' commands "$@"
}
(( $+functions[_oct__help_commands] )) ||
_oct__help_commands() {
    local commands; commands=(
'list:Enumerate available OpenPGP cards' \
'status:Show information about the data on a card' \
'info:Show technical details about a card' \
'ssh:Show a card'\''s authentication key as an SSH public key' \
'pubkey:Export the key data on a card as an OpenPGP public key' \
'admin:Administer data on a card (including keys and metadata)' \
'pin:PIN management (change PINs, reset blocked PINs)' \
'decrypt:Decrypt data using a card' \
'sign:Sign data using a card' \
'attestation:Attestation management (Yubico only)' \
'system:Initialization and similar functionality' \
'output-versions:Show supported output format versions' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'oct help commands' commands "$@"
}
(( $+functions[_oct__help__help_commands] )) ||
_oct__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'oct help help commands' commands "$@"
}
(( $+functions[_oct__pin__help_commands] )) ||
_oct__pin__help_commands() {
    local commands; commands=(
'set-user:Set User PIN' \
'set-admin:Set Admin PIN' \
'reset-user:Reset User PIN with Admin PIN' \
'reset-user-rc:Reset User PIN with Resetting Code' \
'set-reset:Set Resetting Code' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'oct pin help commands' commands "$@"
}
(( $+functions[_oct__pin__help__help_commands] )) ||
_oct__pin__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'oct pin help help commands' commands "$@"
}
(( $+functions[_oct__sign__help_commands] )) ||
_oct__sign__help_commands() {
    local commands; commands=(
'detached:Create a detached signature' \
'cleartext:Create a cleartext signature' \
'inline:Create an inline signature' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'oct sign help commands' commands "$@"
}
(( $+functions[_oct__sign__help__help_commands] )) ||
_oct__sign__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'oct sign help help commands' commands "$@"
}
(( $+functions[_oct__system__help_commands] )) ||
_oct__system__help_commands() {
    local commands; commands=(
'factory-reset:Completely reset a card (deletes all data including keys!)' \
'set-identity:Change identity (Nitrokey Start only)' \
'activate-file:Activate File (recover from "card terminated" state)' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'oct system help commands' commands "$@"
}
(( $+functions[_oct__system__help__help_commands] )) ||
_oct__system__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'oct system help help commands' commands "$@"
}
(( $+functions[_oct__admin__help__import_commands] )) ||
_oct__admin__help__import_commands() {
    local commands; commands=()
    _describe -t commands 'oct admin help import commands' commands "$@"
}
(( $+functions[_oct__admin__import_commands] )) ||
_oct__admin__import_commands() {
    local commands; commands=()
    _describe -t commands 'oct admin import commands' commands "$@"
}
(( $+functions[_oct__help__admin__import_commands] )) ||
_oct__help__admin__import_commands() {
    local commands; commands=()
    _describe -t commands 'oct help admin import commands' commands "$@"
}
(( $+functions[_oct__help__info_commands] )) ||
_oct__help__info_commands() {
    local commands; commands=()
    _describe -t commands 'oct help info commands' commands "$@"
}
(( $+functions[_oct__info_commands] )) ||
_oct__info_commands() {
    local commands; commands=()
    _describe -t commands 'oct info commands' commands "$@"
}
(( $+functions[_oct__help__sign__inline_commands] )) ||
_oct__help__sign__inline_commands() {
    local commands; commands=()
    _describe -t commands 'oct help sign inline commands' commands "$@"
}
(( $+functions[_oct__sign__help__inline_commands] )) ||
_oct__sign__help__inline_commands() {
    local commands; commands=()
    _describe -t commands 'oct sign help inline commands' commands "$@"
}
(( $+functions[_oct__sign__inline_commands] )) ||
_oct__sign__inline_commands() {
    local commands; commands=()
    _describe -t commands 'oct sign inline commands' commands "$@"
}
(( $+functions[_oct__help__list_commands] )) ||
_oct__help__list_commands() {
    local commands; commands=()
    _describe -t commands 'oct help list commands' commands "$@"
}
(( $+functions[_oct__list_commands] )) ||
_oct__list_commands() {
    local commands; commands=()
    _describe -t commands 'oct list commands' commands "$@"
}
(( $+functions[_oct__admin__help__name_commands] )) ||
_oct__admin__help__name_commands() {
    local commands; commands=()
    _describe -t commands 'oct admin help name commands' commands "$@"
}
(( $+functions[_oct__admin__name_commands] )) ||
_oct__admin__name_commands() {
    local commands; commands=()
    _describe -t commands 'oct admin name commands' commands "$@"
}
(( $+functions[_oct__help__admin__name_commands] )) ||
_oct__help__admin__name_commands() {
    local commands; commands=()
    _describe -t commands 'oct help admin name commands' commands "$@"
}
(( $+functions[_oct__help__output-versions_commands] )) ||
_oct__help__output-versions_commands() {
    local commands; commands=()
    _describe -t commands 'oct help output-versions commands' commands "$@"
}
(( $+functions[_oct__output-versions_commands] )) ||
_oct__output-versions_commands() {
    local commands; commands=()
    _describe -t commands 'oct output-versions commands' commands "$@"
}
(( $+functions[_oct__help__pin_commands] )) ||
_oct__help__pin_commands() {
    local commands; commands=(
'set-user:Set User PIN' \
'set-admin:Set Admin PIN' \
'reset-user:Reset User PIN with Admin PIN' \
'reset-user-rc:Reset User PIN with Resetting Code' \
'set-reset:Set Resetting Code' \
    )
    _describe -t commands 'oct help pin commands' commands "$@"
}
(( $+functions[_oct__pin_commands] )) ||
_oct__pin_commands() {
    local commands; commands=(
'set-user:Set User PIN' \
'set-admin:Set Admin PIN' \
'reset-user:Reset User PIN with Admin PIN' \
'reset-user-rc:Reset User PIN with Resetting Code' \
'set-reset:Set Resetting Code' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'oct pin commands' commands "$@"
}
(( $+functions[_oct__help__pubkey_commands] )) ||
_oct__help__pubkey_commands() {
    local commands; commands=()
    _describe -t commands 'oct help pubkey commands' commands "$@"
}
(( $+functions[_oct__pubkey_commands] )) ||
_oct__pubkey_commands() {
    local commands; commands=()
    _describe -t commands 'oct pubkey commands' commands "$@"
}
(( $+functions[_oct__help__pin__reset-user_commands] )) ||
_oct__help__pin__reset-user_commands() {
    local commands; commands=()
    _describe -t commands 'oct help pin reset-user commands' commands "$@"
}
(( $+functions[_oct__pin__help__reset-user_commands] )) ||
_oct__pin__help__reset-user_commands() {
    local commands; commands=()
    _describe -t commands 'oct pin help reset-user commands' commands "$@"
}
(( $+functions[_oct__pin__reset-user_commands] )) ||
_oct__pin__reset-user_commands() {
    local commands; commands=()
    _describe -t commands 'oct pin reset-user commands' commands "$@"
}
(( $+functions[_oct__help__pin__reset-user-rc_commands] )) ||
_oct__help__pin__reset-user-rc_commands() {
    local commands; commands=()
    _describe -t commands 'oct help pin reset-user-rc commands' commands "$@"
}
(( $+functions[_oct__pin__help__reset-user-rc_commands] )) ||
_oct__pin__help__reset-user-rc_commands() {
    local commands; commands=()
    _describe -t commands 'oct pin help reset-user-rc commands' commands "$@"
}
(( $+functions[_oct__pin__reset-user-rc_commands] )) ||
_oct__pin__reset-user-rc_commands() {
    local commands; commands=()
    _describe -t commands 'oct pin reset-user-rc commands' commands "$@"
}
(( $+functions[_oct__help__pin__set-admin_commands] )) ||
_oct__help__pin__set-admin_commands() {
    local commands; commands=()
    _describe -t commands 'oct help pin set-admin commands' commands "$@"
}
(( $+functions[_oct__pin__help__set-admin_commands] )) ||
_oct__pin__help__set-admin_commands() {
    local commands; commands=()
    _describe -t commands 'oct pin help set-admin commands' commands "$@"
}
(( $+functions[_oct__pin__set-admin_commands] )) ||
_oct__pin__set-admin_commands() {
    local commands; commands=()
    _describe -t commands 'oct pin set-admin commands' commands "$@"
}
(( $+functions[_oct__help__system__set-identity_commands] )) ||
_oct__help__system__set-identity_commands() {
    local commands; commands=()
    _describe -t commands 'oct help system set-identity commands' commands "$@"
}
(( $+functions[_oct__system__help__set-identity_commands] )) ||
_oct__system__help__set-identity_commands() {
    local commands; commands=()
    _describe -t commands 'oct system help set-identity commands' commands "$@"
}
(( $+functions[_oct__system__set-identity_commands] )) ||
_oct__system__set-identity_commands() {
    local commands; commands=()
    _describe -t commands 'oct system set-identity commands' commands "$@"
}
(( $+functions[_oct__help__pin__set-reset_commands] )) ||
_oct__help__pin__set-reset_commands() {
    local commands; commands=()
    _describe -t commands 'oct help pin set-reset commands' commands "$@"
}
(( $+functions[_oct__pin__help__set-reset_commands] )) ||
_oct__pin__help__set-reset_commands() {
    local commands; commands=()
    _describe -t commands 'oct pin help set-reset commands' commands "$@"
}
(( $+functions[_oct__pin__set-reset_commands] )) ||
_oct__pin__set-reset_commands() {
    local commands; commands=()
    _describe -t commands 'oct pin set-reset commands' commands "$@"
}
(( $+functions[_oct__help__pin__set-user_commands] )) ||
_oct__help__pin__set-user_commands() {
    local commands; commands=()
    _describe -t commands 'oct help pin set-user commands' commands "$@"
}
(( $+functions[_oct__pin__help__set-user_commands] )) ||
_oct__pin__help__set-user_commands() {
    local commands; commands=()
    _describe -t commands 'oct pin help set-user commands' commands "$@"
}
(( $+functions[_oct__pin__set-user_commands] )) ||
_oct__pin__set-user_commands() {
    local commands; commands=()
    _describe -t commands 'oct pin set-user commands' commands "$@"
}
(( $+functions[_oct__help__sign_commands] )) ||
_oct__help__sign_commands() {
    local commands; commands=(
'detached:Create a detached signature' \
'cleartext:Create a cleartext signature' \
'inline:Create an inline signature' \
    )
    _describe -t commands 'oct help sign commands' commands "$@"
}
(( $+functions[_oct__sign_commands] )) ||
_oct__sign_commands() {
    local commands; commands=(
'detached:Create a detached signature' \
'cleartext:Create a cleartext signature' \
'inline:Create an inline signature' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'oct sign commands' commands "$@"
}
(( $+functions[_oct__help__ssh_commands] )) ||
_oct__help__ssh_commands() {
    local commands; commands=()
    _describe -t commands 'oct help ssh commands' commands "$@"
}
(( $+functions[_oct__ssh_commands] )) ||
_oct__ssh_commands() {
    local commands; commands=()
    _describe -t commands 'oct ssh commands' commands "$@"
}
(( $+functions[_oct__attestation__help__statement_commands] )) ||
_oct__attestation__help__statement_commands() {
    local commands; commands=()
    _describe -t commands 'oct attestation help statement commands' commands "$@"
}
(( $+functions[_oct__attestation__statement_commands] )) ||
_oct__attestation__statement_commands() {
    local commands; commands=()
    _describe -t commands 'oct attestation statement commands' commands "$@"
}
(( $+functions[_oct__help__attestation__statement_commands] )) ||
_oct__help__attestation__statement_commands() {
    local commands; commands=()
    _describe -t commands 'oct help attestation statement commands' commands "$@"
}
(( $+functions[_oct__help__status_commands] )) ||
_oct__help__status_commands() {
    local commands; commands=()
    _describe -t commands 'oct help status commands' commands "$@"
}
(( $+functions[_oct__status_commands] )) ||
_oct__status_commands() {
    local commands; commands=()
    _describe -t commands 'oct status commands' commands "$@"
}
(( $+functions[_oct__help__system_commands] )) ||
_oct__help__system_commands() {
    local commands; commands=(
'factory-reset:Completely reset a card (deletes all data including keys!)' \
'set-identity:Change identity (Nitrokey Start only)' \
'activate-file:Activate File (recover from "card terminated" state)' \
    )
    _describe -t commands 'oct help system commands' commands "$@"
}
(( $+functions[_oct__system_commands] )) ||
_oct__system_commands() {
    local commands; commands=(
'factory-reset:Completely reset a card (deletes all data including keys!)' \
'set-identity:Change identity (Nitrokey Start only)' \
'activate-file:Activate File (recover from "card terminated" state)' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'oct system commands' commands "$@"
}
(( $+functions[_oct__admin__help__touch_commands] )) ||
_oct__admin__help__touch_commands() {
    local commands; commands=()
    _describe -t commands 'oct admin help touch commands' commands "$@"
}
(( $+functions[_oct__admin__touch_commands] )) ||
_oct__admin__touch_commands() {
    local commands; commands=()
    _describe -t commands 'oct admin touch commands' commands "$@"
}
(( $+functions[_oct__help__admin__touch_commands] )) ||
_oct__help__admin__touch_commands() {
    local commands; commands=()
    _describe -t commands 'oct help admin touch commands' commands "$@"
}
(( $+functions[_oct__admin__help__url_commands] )) ||
_oct__admin__help__url_commands() {
    local commands; commands=()
    _describe -t commands 'oct admin help url commands' commands "$@"
}
(( $+functions[_oct__admin__url_commands] )) ||
_oct__admin__url_commands() {
    local commands; commands=()
    _describe -t commands 'oct admin url commands' commands "$@"
}
(( $+functions[_oct__help__admin__url_commands] )) ||
_oct__help__admin__url_commands() {
    local commands; commands=()
    _describe -t commands 'oct help admin url commands' commands "$@"
}

if [ "$funcstack[1]" = "_oct" ]; then
    _oct "$@"
else
    compdef _oct oct
fi
