diff options
Diffstat (limited to 'completions/ldapsearch')
-rw-r--r-- | completions/ldapsearch | 145 |
1 files changed, 76 insertions, 69 deletions
diff --git a/completions/ldapsearch b/completions/ldapsearch index 6dc415e..71c728e 100644 --- a/completions/ldapsearch +++ b/completions/ldapsearch @@ -1,231 +1,238 @@ # bash completion for openldap -*- shell-script -*- -_ldap_uris() +_comp_cmd_ldapsearch__ldap_uris() { - COMPREPLY=($(compgen -W 'ldap:// ldaps://' -- "$cur")) + _comp_compgen -- -W 'ldap:// ldaps://' } -_ldap_protocols() +_comp_cmd_ldapsearch__ldap_protocols() { - COMPREPLY=($(compgen -W '2 3' -- "$cur")) + _comp_compgen -- -W '2 3' } -_ldapsearch() +_comp_cmd_ldapsearch() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -*h) - _known_hosts_real -- "$cur" + _comp_compgen_known_hosts -- "$cur" return ;; -*H) - _ldap_uris + _comp_cmd_ldapsearch__ldap_uris return ;; -*T) - _filedir -d + _comp_compgen_filedir -d return ;; -*[fy]) - _filedir + _comp_compgen_filedir return ;; -*s) - COMPREPLY=($(compgen -W 'base one sub children' -- "$cur")) + _comp_compgen -- -W 'base one sub children' return ;; -*a) - COMPREPLY=($(compgen -W 'never always search find' -- "$cur")) + _comp_compgen -- -W 'never always search find' return ;; -*P) - _ldap_protocols + _comp_cmd_ldapsearch__ldap_protocols return ;; esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1") -MM -ZZ' -- "$cur")) + _comp_compgen_help + _comp_compgen -a -- -W '-MM -ZZ' fi } && - complete -F _ldapsearch ldapsearch + complete -F _comp_cmd_ldapsearch ldapsearch -_ldapaddmodify() +_comp_cmd_ldapadd() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -*h) - _known_hosts_real -- "$cur" + _comp_compgen_known_hosts -- "$cur" return ;; -*H) - _ldap_uris + _comp_cmd_ldapsearch__ldap_uris return ;; -*[Sfy]) - _filedir + _comp_compgen_filedir return ;; -*P) - _ldap_protocols + _comp_cmd_ldapsearch__ldap_protocols return ;; esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1") -MM -ZZ' -- "$cur")) + _comp_compgen_help + _comp_compgen -a -- -W '-MM -ZZ' fi } && - complete -F _ldapaddmodify ldapadd ldapmodify + complete -F _comp_cmd_ldapadd ldapadd ldapmodify -_ldapdelete() +_comp_cmd_ldapdelete() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -*h) - _known_hosts_real -- "$cur" + _comp_compgen_known_hosts -- "$cur" return ;; -*H) - _ldap_uris + _comp_cmd_ldapsearch__ldap_uris return ;; -*[fy]) - _filedir + _comp_compgen_filedir return ;; -*P) - _ldap_protocols + _comp_cmd_ldapsearch__ldap_protocols return ;; esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1") -MM -ZZ' -- "$cur")) + _comp_compgen_help + _comp_compgen -a -- -W '-MM -ZZ' fi } && - complete -F _ldapdelete ldapdelete + complete -F _comp_cmd_ldapdelete ldapdelete -_ldapcompare() +_comp_cmd_ldapcompare() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -*h) - _known_hosts_real -- "$cur" + _comp_compgen_known_hosts -- "$cur" return ;; -*H) - _ldap_uris + _comp_cmd_ldapsearch__ldap_uris return ;; -*y) - _filedir + _comp_compgen_filedir return ;; -*P) - _ldap_protocols + _comp_cmd_ldapsearch__ldap_protocols return ;; esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1") -MM -ZZ' -- "$cur")) + _comp_compgen_help + _comp_compgen -a -- -W '-MM -ZZ' fi } && - complete -F _ldapcompare ldapcompare + complete -F _comp_cmd_ldapcompare ldapcompare -_ldapmodrdn() +_comp_cmd_ldapmodrdn() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -*h) - _known_hosts_real -- "$cur" + _comp_compgen_known_hosts -- "$cur" return ;; -*H) - _ldap_uris + _comp_cmd_ldapsearch__ldap_uris return ;; -*[fy]) - _filedir + _comp_compgen_filedir return ;; -*P) - _ldap_protocols + _comp_cmd_ldapsearch__ldap_protocols return ;; esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1") -ZZ -MM' -- "$cur")) + _comp_compgen_help + _comp_compgen -a -- -W '-ZZ -MM' fi } && - complete -F _ldapmodrdn ldapmodrdn + complete -F _comp_cmd_ldapmodrdn ldapmodrdn -_ldapwhoami() +_comp_cmd_ldapwhoami() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -*h) - _known_hosts_real -- "$cur" + _comp_compgen_known_hosts -- "$cur" return ;; -*H) - _ldap_uris + _comp_cmd_ldapsearch__ldap_uris return ;; -*[fy]) - _filedir + _comp_compgen_filedir return ;; -*P) - _ldap_protocols + _comp_cmd_ldapsearch__ldap_protocols return ;; esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1") -MM -ZZ' -- "$cur")) + _comp_compgen_help + _comp_compgen -a -- -W '-MM -ZZ' fi } && - complete -F _ldapwhoami ldapwhoami + complete -F _comp_cmd_ldapwhoami ldapwhoami -_ldappasswd() +_comp_cmd_ldappasswd() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -*h) - _known_hosts_real -- "$cur" + _comp_compgen_known_hosts -- "$cur" return ;; -*H) - _ldap_uris + _comp_cmd_ldapsearch__ldap_uris return ;; -*[tTy]) - _filedir + _comp_compgen_filedir return ;; esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1") -MM -ZZ' -- "$cur")) + _comp_compgen_help + _comp_compgen -a -- -W '-MM -ZZ' fi } && - complete -F _ldappasswd ldappasswd + complete -F _comp_cmd_ldappasswd ldappasswd # ex: filetype=sh |