59 lines
1.7 KiB
Bash
59 lines
1.7 KiB
Bash
# this was auto-generated by OpenSC/doc/tools/Makefile.am
|
|
_goid_tool()
|
|
{
|
|
COMPREPLY=()
|
|
local cur prev split=false
|
|
_get_comp_words_by_ref -n : cur prev
|
|
|
|
_split_longopt && split=true
|
|
|
|
opts=" --certificate --create-dg --delete-dg --help --in-file --info --key --new-bio --new-pin --new-read-ac --new-read-ac-chatbit --new-size --new-write-ac --new-write-ac-chatbit --out-file --print-cardid --print-paccessid --read-dg --reader --verbose --verify-bio --verify-pin --verify-pin-or-bio --version --write-cardid --write-dg --write-paccessid -V -b -c -h -k -p -r -v "
|
|
|
|
if [ ${COMP_CWORD} -eq 1 ]; then
|
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
|
return 0
|
|
fi
|
|
|
|
case "${prev}" in
|
|
!*)
|
|
_filedir so
|
|
return 0
|
|
;;
|
|
--certificate|--in-file|--out-file|-c)
|
|
_filedir
|
|
return 0
|
|
;;
|
|
!*|--password)
|
|
COMPREPLY=( $( compgen -W "$(printenv | cut -d = -f 1 | xargs printf 'env:%s ')" -- $cur ) )
|
|
__ltrim_colon_completions "$cur"
|
|
return 0
|
|
;;
|
|
--certificate|--create-dg|--delete-dg|--in-file|--new-read-ac|--new-read-ac-chatbit|--new-size|--new-write-ac|--new-write-ac-chatbit|--out-file|--read-dg|--reader|--write-cardid|--write-dg|--write-paccessid|-c|-r)
|
|
return 0
|
|
;;
|
|
*)
|
|
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
|
return 0
|
|
;;
|
|
esac
|
|
|
|
$split && return 0
|
|
|
|
if [[ "$cur" == -* ]]; then
|
|
_longopt $1
|
|
return
|
|
fi
|
|
|
|
_filedir
|
|
}
|
|
complete -F _goid_tool goid-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
|