# this was auto-generated by OpenSC/doc/tools/Makefile.am _pkcs11_tool() { COMPREPLY=() local cur prev split=false _get_comp_words_by_ref -n : cur prev if type _init_completion &>/dev/null; then _init_completion -s && split=true else _split_longopt && split=true fi opts=" --aad --allow-sw --allowed-mechanisms --always-auth --application-id --application-label --attr-from --change-pin --decrypt --delete-object --derive --derive-pass-der --encrypt --extractable --generate-random --hash --hash-algorithm --id --info-file --init-pin --init-token --input-file --issuer --iv --key-type --keygen --keypairgen --label --list-interfaces --list-mechanisms --list-objects --list-slots --list-token-slots --login --login-type --mac-general-param --mechanism --mgf --module --moz-cert --new-pin --object-index --output-file --pin --private --public-key-info --puk --read-object --read-object --type public --salt-file --salt-len --sensitive --session-rw --set-id --show-info --sign --signature-file --signature-format --slot --slot-description --slot-index --so-pin --subject --tag-bits-len --test --test-ec --test-fork --test-hotplug --test-threads --token-label --type --undestroyable --unlock-pin --unwrap --uri --uri-with-slot-id --usage-decrypt --usage-derive --usage-encapsulate --usage-sign --usage-wrap --use-locking --verify --wrap --write-object -I -L -M -O -T -a -b -c -d -e -h -i -k -l -m -o -p -r -s -t -v -w -y -z " if [ ${COMP_CWORD} -eq 1 ]; then COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 fi case "${prev}" in --module) _filedir so return 0 ;; --attr-from|--info-file|--input-file|--moz-cert|--output-file|--salt-file|--signature-file|--write-object|-i|-o|-w|-z) _filedir return 0 ;; --new-pin|--pin|--puk|--so-pin|-p|--password) COMPREPLY=( $( compgen -W "$(printenv | cut -d = -f 1 | xargs printf 'env:%s ')" -- $cur ) ) __ltrim_colon_completions "$cur" return 0 ;; --aad|--allowed-mechanisms|--application-id|--application-label|--attr-from|--generate-random|--hash-algorithm|--id|--info-file|--input-file|--issuer|--iv|--key-type|--label|--mac-general-param|--mechanism|--mgf|--module|--moz-cert|--new-pin|--object-index|--output-file|--pin|--puk|--salt-file|--salt-len|--set-id|--signature-file|--signature-format|--slot|--slot-description|--slot-index|--so-pin|--subject|--tag-bits-len|--test-threads|--token-label|--type|--uri|--write-object|-a|-d|-e|-i|-m|-o|-p|-w|-y|-z) return 0 ;; *) COMPREPLY=($(compgen -W "${opts}" -- ${cur})) return 0 ;; esac $split && return 0 if [[ "$cur" == -* ]]; then _longopt $1 return fi _filedir } complete -F _pkcs11_tool pkcs11-tool # Local variables: # mode: shell-script # sh-basic-offset: 4 # sh-indent-comment: t # indent-tabs-mode: nil # End: # ex: ts=4 sw=4 et filetype=sh