# bash completion for ldapvi -*- shell-script -*- proc _ldapvi { local cur prev words cword _init_completion || return match $prev { with -h|--host _known_hosts_real $cur return 0 with -Y|--sasl-mech setglobal COMPREPLY = ''( $( compgen -W 'EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 PLAIN ANONYMOUS' -- "$cur" ) ) return 0 with --bind setglobal COMPREPLY = ''( $( compgen -W 'simple sasl' -- "$cur" ) ) return 0 with --bind-dialog setglobal COMPREPLY = ''( $( compgen -W 'never auto always' -- "$cur" ) ) return 0 with --scope setglobal COMPREPLY = ''( $( compgen -W 'base one sub' -- "$cur" ) ) return 0 with --deref setglobal COMPREPLY = ''( $( compgen -W 'never searching finding always' \ -- "$cur" ) ) return 0 with --encoding setglobal COMPREPLY = ''( $( compgen -W 'ASCII UTF-8 binary' -- "$cur" ) ) return 0 with --tls setglobal COMPREPLY = ''( $( compgen -W 'never allow try strict' -- "$cur" ) ) return 0 } if [[ "$cur" == -* ]] { setglobal COMPREPLY = ''( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) } } && complete -F _ldapvi ldapvi # ex: ts=4 sw=4 et filetype=sh