#compdef sqop autoload -U is-at-least _sqop() { 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[@]}" : \ '--debug[Emit verbose output for debugging]' \ '-h[Print help]' \ '--help[Print help]' \ ":: :_sqop_commands" \ "*::: :->sop" \ && ret=0 case $state in (sop) words=($line[1] "${words[@]}") (( CURRENT += 1 )) curcontext="${curcontext%:*:*}:sqop-command-$line[1]:" case $line[1] in (version) _arguments "${_arguments_options[@]}" : \ '(--extended --sop-spec --sopv)--backend[Returns name and version of the primary underlying OpenPGP toolkit]' \ '(--backend --sop-spec --sopv)--extended[Returns multiple lines of name and version information]' \ '(--backend --extended --sopv)--sop-spec[Returns the latest version of the SOP spec that is implemented]' \ '(--backend --extended --sop-spec)--sopv[Returns "1.0\\n" if the sopv subset is implemented]' \ '--debug[Emit verbose output for debugging]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ && ret=0 ;; (verify) _arguments "${_arguments_options[@]}" : \ '--not-before=[Consider signatures before this date invalid]:NOT_BEFORE:_default' \ '--not-after=[Consider signatures after this date invalid]:NOT_AFTER:_default' \ '--debug[Emit verbose output for debugging]' \ '-h[Print help]' \ '--help[Print help]' \ ':signatures -- Signatures to verify:_default' \ '*::certs -- Certs for verification:_default' \ && ret=0 ;; (inline-verify) _arguments "${_arguments_options[@]}" : \ '--not-before=[Consider signatures before this date invalid]:NOT_BEFORE:_default' \ '--not-after=[Consider signatures after this date invalid]:NOT_AFTER:_default' \ '--verifications-out=[Write verification result here]:VERIFICATIONS_OUT:_default' \ '--debug[Emit verbose output for debugging]' \ '-h[Print help]' \ '--help[Print help]' \ '*::certs -- Certs for verification:_default' \ && ret=0 ;; (list-profiles) _arguments "${_arguments_options[@]}" : \ '--debug[Emit verbose output for debugging]' \ '-h[Print help]' \ '--help[Print help]' \ ':subcommand:_default' \ && ret=0 ;; (generate-key) _arguments "${_arguments_options[@]}" : \ '--profile=[Select the profile to use for key generation]:PROFILE:_default' \ '--with-key-password=[Protect the newly generated key with the given password]:WITH_KEY_PASSWORD:_default' \ '--no-armor[Don'\''t ASCII-armor output]' \ '--signing-only[Create a signing-only key]' \ '--debug[Emit verbose output for debugging]' \ '-h[Print help]' \ '--help[Print help]' \ '*::userids -- UserIDs for the generated key:_default' \ && ret=0 ;; (change-key-password) _arguments "${_arguments_options[@]}" : \ '--new-key-password=[The new password to lock the key with, or just unlock the key if the option is absent]:NEW_KEY_PASSWORD:_default' \ '*--old-key-password=[Unlock the keys with these passwords]:OLD_KEY_PASSWORD:_default' \ '--no-armor[Don'\''t ASCII-armor output]' \ '--debug[Emit verbose output for debugging]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ && ret=0 ;; (revoke-key) _arguments "${_arguments_options[@]}" : \ '*--with-key-password=[Unlock the keys with these passwords]:WITH_KEY_PASSWORD:_default' \ '--no-armor[Don'\''t ASCII-armor output]' \ '--debug[Emit verbose output for debugging]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ && ret=0 ;; (extract-cert) _arguments "${_arguments_options[@]}" : \ '--no-armor[Don'\''t ASCII-armor output]' \ '--debug[Emit verbose output for debugging]' \ '-h[Print help]' \ '--help[Print help]' \ && ret=0 ;; (update-key) _arguments "${_arguments_options[@]}" : \ '*--with-key-password=[Unlock the keys with these passwords]:WITH_KEY_PASSWORD:_default' \ '*--merge-certs=[Merge updates into the key]:MERGE_CERTS:_default' \ '--no-armor[Don'\''t ASCII-armor output]' \ '--signing-only[Don'\''t make the updated key encryption-capable if it isn'\''t already]' \ '--no-added-capabilities[Don'\''t advertise support for capabilities that aren'\''t already advertised by the key]' \ '--debug[Emit verbose output for debugging]' \ '-h[Print help]' \ '--help[Print help]' \ && ret=0 ;; (merge-certs) _arguments "${_arguments_options[@]}" : \ '--no-armor[Don'\''t ASCII-armor output]' \ '--debug[Emit verbose output for debugging]' \ '-h[Print help]' \ '--help[Print help]' \ '*::certs -- Merge updates into the certs:_default' \ && ret=0 ;; (certify-userid) _arguments "${_arguments_options[@]}" : \ '*--userid=[Certify the specified user IDs]:USERID:_default' \ '*--with-key-password=[Unlock the keys with these passwords]:WITH_KEY_PASSWORD:_default' \ '--no-armor[Don'\''t ASCII-armor output]' \ '--no-require-self-sig[Don'\''t require self-signatures on the user IDs to be certified]' \ '--debug[Emit verbose output for debugging]' \ '-h[Print help]' \ '--help[Print help]' \ '*::keys -- Create certifications using these keys:_default' \ && ret=0 ;; (validate-userid) _arguments "${_arguments_options[@]}" : \ '--validate-at=[Evaluate the validity of the User ID at the specified time, not at the current time]:VALIDATE_AT:_default' \ '--addr-spec-only[Treat USERID as an e-mail address, and matched only against the e-mail address part of each correctly bound User ID]' \ '--debug[Emit verbose output for debugging]' \ '-h[Print help]' \ '--help[Print help]' \ ':userid -- The User ID to validate:_default' \ '*::certs -- Authority OpenPGP certificates, i.e. trust roots:_default' \ && ret=0 ;; (sign) _arguments "${_arguments_options[@]}" : \ '--as=[Sign binary data or UTF-8 text]:AS:_default' \ '--micalg-out=[Emit the digest algorithm used to the specified file]:MICALG_OUT:_default' \ '*--with-key-password=[Try to decrypt the signing KEYS with these passwords]:WITH_KEY_PASSWORD:_default' \ '--no-armor[Don'\''t ASCII-armor output]' \ '--debug[Emit verbose output for debugging]' \ '-h[Print help]' \ '--help[Print help]' \ '*::keys -- Keys for signing:_default' \ && ret=0 ;; (encrypt) _arguments "${_arguments_options[@]}" : \ '--profile=[Select the profile to use for encryption]:PROFILE:_default' \ '--as=[Encrypt binary data or UTF-8 text]:AS:_default' \ '*--with-password=[Encrypt with passwords]:WITH_PASSWORD:_default' \ '*--sign-with=[Keys for signing]:SIGN_WITH:_default' \ '*--with-key-password=[Try to decrypt the signing KEYS with these passwords]:WITH_KEY_PASSWORD:_default' \ '--session-key-out=[Write the session key here]:SESSION_KEY_OUT:_default' \ '--no-armor[Don'\''t ASCII-armor output]' \ '--debug[Emit verbose output for debugging]' \ '-h[Print help]' \ '--help[Print help]' \ '*::certs -- Encrypt for these certs:_default' \ && ret=0 ;; (decrypt) _arguments "${_arguments_options[@]}" : \ '--session-key-out=[Write the session key here]:SESSION_KEY_OUT:_default' \ '*--with-session-key=[Try to decrypt with this session key]:WITH_SESSION_KEY:_default' \ '*--with-password=[Try to decrypt with this password]:WITH_PASSWORD:_default' \ '--verifications-out=[Write verification result here]:VERIFICATIONS_OUT:_default' \ '*--verify-with=[Certs for verification]:VERIFY_WITH:_default' \ '--verify-not-before=[Consider signatures before this date invalid]:VERIFY_NOT_BEFORE:_default' \ '--verify-not-after=[Consider signatures after this date invalid]:VERIFY_NOT_AFTER:_default' \ '*--with-key-password=[Try to decrypt the encryption KEYS with these passwords]:WITH_KEY_PASSWORD:_default' \ '--debug[Emit verbose output for debugging]' \ '-h[Print help]' \ '--help[Print help]' \ '*::keys -- Try to decrypt with these keys:_default' \ && ret=0 ;; (armor) _arguments "${_arguments_options[@]}" : \ '--label=[Indicates the kind of data]:LABEL:_default' \ '--debug[Emit verbose output for debugging]' \ '-h[Print help]' \ '--help[Print help]' \ && ret=0 ;; (dearmor) _arguments "${_arguments_options[@]}" : \ '--debug[Emit verbose output for debugging]' \ '-h[Print help]' \ '--help[Print help]' \ && ret=0 ;; (inline-detach) _arguments "${_arguments_options[@]}" : \ '--signatures-out=[Write Signatures here]:SIGNATURES_OUT:_default' \ '--no-armor[Don'\''t ASCII-armor the signatures]' \ '--debug[Emit verbose output for debugging]' \ '-h[Print help]' \ '--help[Print help]' \ && ret=0 ;; (inline-sign) _arguments "${_arguments_options[@]}" : \ '--as=[Sign binary data, UTF-8 text, or using the Cleartext Signature Framework]:AS:_default' \ '*--with-key-password=[Try to decrypt the signing KEYS with these passwords]:WITH_KEY_PASSWORD:_default' \ '--no-armor[Don'\''t ASCII-armor output]' \ '--debug[Emit verbose output for debugging]' \ '-h[Print help]' \ '--help[Print help]' \ '*::keys -- Keys for signing:_default' \ && ret=0 ;; (help) _arguments "${_arguments_options[@]}" : \ ":: :_sqop__help_commands" \ "*::: :->help" \ && ret=0 case $state in (help) words=($line[1] "${words[@]}") (( CURRENT += 1 )) curcontext="${curcontext%:*:*}:sqop-help-command-$line[1]:" case $line[1] in (version) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (verify) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (inline-verify) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (list-profiles) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (generate-key) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (change-key-password) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (revoke-key) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (extract-cert) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (update-key) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (merge-certs) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (certify-userid) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (validate-userid) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (sign) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (encrypt) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (decrypt) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (armor) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (dearmor) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (inline-detach) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (inline-sign) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; (help) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; esac ;; esac ;; esac ;; esac } (( $+functions[_sqop_commands] )) || _sqop_commands() { local commands; commands=( 'version:Prints version information' \ 'verify:Verifies Detached Signatures' \ 'inline-verify:Verifies Inline-Signed Messages' \ 'list-profiles:Emits a list of profiles supported by the identified subcommand' \ 'generate-key:Generates a Secret Key' \ 'change-key-password:Updates a key'\''s password' \ 'revoke-key:Creates a Revocation Certificate' \ 'extract-cert:Extracts a Certificate from a Secret Key' \ 'update-key:Keep a Secret Key Up-To-Date' \ 'merge-certs:Merge OpenPGP Certificates' \ 'certify-userid:Certify OpenPGP Certificate User IDs' \ 'validate-userid:Validate a User ID in an OpenPGP Certificate' \ 'sign:Creates Detached Signatures' \ 'encrypt:Encrypts a Message' \ 'decrypt:Decrypts a Message' \ 'armor:Converts binary OpenPGP data to ASCII' \ 'dearmor:Converts ASCII OpenPGP data to binary' \ 'inline-detach:Splits Signatures from an Inline-Signed Message' \ 'inline-sign:Creates Inline-Signed Messages' \ 'help:Print this message or the help of the given subcommand(s)' \ ) _describe -t commands 'sqop commands' commands "$@" } (( $+functions[_sqop__armor_commands] )) || _sqop__armor_commands() { local commands; commands=() _describe -t commands 'sqop armor commands' commands "$@" } (( $+functions[_sqop__certify-userid_commands] )) || _sqop__certify-userid_commands() { local commands; commands=() _describe -t commands 'sqop certify-userid commands' commands "$@" } (( $+functions[_sqop__change-key-password_commands] )) || _sqop__change-key-password_commands() { local commands; commands=() _describe -t commands 'sqop change-key-password commands' commands "$@" } (( $+functions[_sqop__dearmor_commands] )) || _sqop__dearmor_commands() { local commands; commands=() _describe -t commands 'sqop dearmor commands' commands "$@" } (( $+functions[_sqop__decrypt_commands] )) || _sqop__decrypt_commands() { local commands; commands=() _describe -t commands 'sqop decrypt commands' commands "$@" } (( $+functions[_sqop__encrypt_commands] )) || _sqop__encrypt_commands() { local commands; commands=() _describe -t commands 'sqop encrypt commands' commands "$@" } (( $+functions[_sqop__extract-cert_commands] )) || _sqop__extract-cert_commands() { local commands; commands=() _describe -t commands 'sqop extract-cert commands' commands "$@" } (( $+functions[_sqop__generate-key_commands] )) || _sqop__generate-key_commands() { local commands; commands=() _describe -t commands 'sqop generate-key commands' commands "$@" } (( $+functions[_sqop__help_commands] )) || _sqop__help_commands() { local commands; commands=( 'version:Prints version information' \ 'verify:Verifies Detached Signatures' \ 'inline-verify:Verifies Inline-Signed Messages' \ 'list-profiles:Emits a list of profiles supported by the identified subcommand' \ 'generate-key:Generates a Secret Key' \ 'change-key-password:Updates a key'\''s password' \ 'revoke-key:Creates a Revocation Certificate' \ 'extract-cert:Extracts a Certificate from a Secret Key' \ 'update-key:Keep a Secret Key Up-To-Date' \ 'merge-certs:Merge OpenPGP Certificates' \ 'certify-userid:Certify OpenPGP Certificate User IDs' \ 'validate-userid:Validate a User ID in an OpenPGP Certificate' \ 'sign:Creates Detached Signatures' \ 'encrypt:Encrypts a Message' \ 'decrypt:Decrypts a Message' \ 'armor:Converts binary OpenPGP data to ASCII' \ 'dearmor:Converts ASCII OpenPGP data to binary' \ 'inline-detach:Splits Signatures from an Inline-Signed Message' \ 'inline-sign:Creates Inline-Signed Messages' \ 'help:Print this message or the help of the given subcommand(s)' \ ) _describe -t commands 'sqop help commands' commands "$@" } (( $+functions[_sqop__help__armor_commands] )) || _sqop__help__armor_commands() { local commands; commands=() _describe -t commands 'sqop help armor commands' commands "$@" } (( $+functions[_sqop__help__certify-userid_commands] )) || _sqop__help__certify-userid_commands() { local commands; commands=() _describe -t commands 'sqop help certify-userid commands' commands "$@" } (( $+functions[_sqop__help__change-key-password_commands] )) || _sqop__help__change-key-password_commands() { local commands; commands=() _describe -t commands 'sqop help change-key-password commands' commands "$@" } (( $+functions[_sqop__help__dearmor_commands] )) || _sqop__help__dearmor_commands() { local commands; commands=() _describe -t commands 'sqop help dearmor commands' commands "$@" } (( $+functions[_sqop__help__decrypt_commands] )) || _sqop__help__decrypt_commands() { local commands; commands=() _describe -t commands 'sqop help decrypt commands' commands "$@" } (( $+functions[_sqop__help__encrypt_commands] )) || _sqop__help__encrypt_commands() { local commands; commands=() _describe -t commands 'sqop help encrypt commands' commands "$@" } (( $+functions[_sqop__help__extract-cert_commands] )) || _sqop__help__extract-cert_commands() { local commands; commands=() _describe -t commands 'sqop help extract-cert commands' commands "$@" } (( $+functions[_sqop__help__generate-key_commands] )) || _sqop__help__generate-key_commands() { local commands; commands=() _describe -t commands 'sqop help generate-key commands' commands "$@" } (( $+functions[_sqop__help__help_commands] )) || _sqop__help__help_commands() { local commands; commands=() _describe -t commands 'sqop help help commands' commands "$@" } (( $+functions[_sqop__help__inline-detach_commands] )) || _sqop__help__inline-detach_commands() { local commands; commands=() _describe -t commands 'sqop help inline-detach commands' commands "$@" } (( $+functions[_sqop__help__inline-sign_commands] )) || _sqop__help__inline-sign_commands() { local commands; commands=() _describe -t commands 'sqop help inline-sign commands' commands "$@" } (( $+functions[_sqop__help__inline-verify_commands] )) || _sqop__help__inline-verify_commands() { local commands; commands=() _describe -t commands 'sqop help inline-verify commands' commands "$@" } (( $+functions[_sqop__help__list-profiles_commands] )) || _sqop__help__list-profiles_commands() { local commands; commands=() _describe -t commands 'sqop help list-profiles commands' commands "$@" } (( $+functions[_sqop__help__merge-certs_commands] )) || _sqop__help__merge-certs_commands() { local commands; commands=() _describe -t commands 'sqop help merge-certs commands' commands "$@" } (( $+functions[_sqop__help__revoke-key_commands] )) || _sqop__help__revoke-key_commands() { local commands; commands=() _describe -t commands 'sqop help revoke-key commands' commands "$@" } (( $+functions[_sqop__help__sign_commands] )) || _sqop__help__sign_commands() { local commands; commands=() _describe -t commands 'sqop help sign commands' commands "$@" } (( $+functions[_sqop__help__update-key_commands] )) || _sqop__help__update-key_commands() { local commands; commands=() _describe -t commands 'sqop help update-key commands' commands "$@" } (( $+functions[_sqop__help__validate-userid_commands] )) || _sqop__help__validate-userid_commands() { local commands; commands=() _describe -t commands 'sqop help validate-userid commands' commands "$@" } (( $+functions[_sqop__help__verify_commands] )) || _sqop__help__verify_commands() { local commands; commands=() _describe -t commands 'sqop help verify commands' commands "$@" } (( $+functions[_sqop__help__version_commands] )) || _sqop__help__version_commands() { local commands; commands=() _describe -t commands 'sqop help version commands' commands "$@" } (( $+functions[_sqop__inline-detach_commands] )) || _sqop__inline-detach_commands() { local commands; commands=() _describe -t commands 'sqop inline-detach commands' commands "$@" } (( $+functions[_sqop__inline-sign_commands] )) || _sqop__inline-sign_commands() { local commands; commands=() _describe -t commands 'sqop inline-sign commands' commands "$@" } (( $+functions[_sqop__inline-verify_commands] )) || _sqop__inline-verify_commands() { local commands; commands=() _describe -t commands 'sqop inline-verify commands' commands "$@" } (( $+functions[_sqop__list-profiles_commands] )) || _sqop__list-profiles_commands() { local commands; commands=() _describe -t commands 'sqop list-profiles commands' commands "$@" } (( $+functions[_sqop__merge-certs_commands] )) || _sqop__merge-certs_commands() { local commands; commands=() _describe -t commands 'sqop merge-certs commands' commands "$@" } (( $+functions[_sqop__revoke-key_commands] )) || _sqop__revoke-key_commands() { local commands; commands=() _describe -t commands 'sqop revoke-key commands' commands "$@" } (( $+functions[_sqop__sign_commands] )) || _sqop__sign_commands() { local commands; commands=() _describe -t commands 'sqop sign commands' commands "$@" } (( $+functions[_sqop__update-key_commands] )) || _sqop__update-key_commands() { local commands; commands=() _describe -t commands 'sqop update-key commands' commands "$@" } (( $+functions[_sqop__validate-userid_commands] )) || _sqop__validate-userid_commands() { local commands; commands=() _describe -t commands 'sqop validate-userid commands' commands "$@" } (( $+functions[_sqop__verify_commands] )) || _sqop__verify_commands() { local commands; commands=() _describe -t commands 'sqop verify commands' commands "$@" } (( $+functions[_sqop__version_commands] )) || _sqop__version_commands() { local commands; commands=() _describe -t commands 'sqop version commands' commands "$@" } if [ "$funcstack[1]" = "_sqop" ]; then _sqop "$@" else compdef _sqop sqop fi