59 lines
2.7 KiB
Bash
59 lines
2.7 KiB
Bash
# 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
|
|
|
|
_split_longopt && split=true
|
|
|
|
opts=" --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 --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 --mechanism --mgf --module --moz-cert --new-pin --object-index --output-file --pin --private --puk --read-object --salt-len --sensitive --session-rw --set-id --show-info --sign --signature-file --signature-format --slot --slot-description --slot-index --so-pin --subject --test --test-ec --test-fork --test-hotplug --test-threads --token-label --type --undestroyable --unlock-pin --unwrap --usage-decrypt --usage-derive --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|--input-file|--moz-cert|--output-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
|
|
;;
|
|
--allowed-mechanisms|--application-id|--application-label|--attr-from|--generate-random|--hash-algorithm|--id|--input-file|--issuer|--iv|--key-type|--label|--mechanism|--mgf|--module|--moz-cert|--new-pin|--object-index|--output-file|--pin|--puk|--salt-len|--set-id|--signature-file|--signature-format|--slot|--slot-description|--slot-index|--so-pin|--subject|--test-threads|--token-label|--type|--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
|