complete -c ldapsearch -s V -d 'Print version info' complete -c ldapsearch -o VV -d 'Print version info and exit' complete -c ldapsearch -s d -x -d 'Set the LDAP debug level' complete -c ldapsearch -s n -d 'Show what would be done, but don\'t actually perform search' complete -c ldapsearch -s v -d 'Run in verbose mode' complete -c ldapsearch -s c -d 'Continuous operation mode' complete -c ldapsearch -s u -d 'Include User Friendly Name of the Distinguished Name (DN)' complete -c ldapsearch -s t -d 'Write retrieved non-printable values to temp files' complete -o ldapsearch -o tt -d 'Write all retrieved values to temp files' complete -c ldapsearch -s T -r -d 'Write temp files to specified directory' complete -c ldapsearch -s F -x -d 'URL prefix for temp files' complete -c ldapsearch -s A -d 'Retrieve attributes only' complete -c ldapsearch -s L -d 'Search results are display in LDAP Data Interchange Format' complete -c ldapsearch -s S -x -d 'Sort the entries returned based on attribute' complete -c ldapsearch -s b -x -d 'Specify starting point for the search' complete -c ldapsearch -s s -xa 'base one sub children' -d 'Specify the scope of the search' complete -c ldapsearch -s a -xa 'never always search find' -d 'Specify how aliases dereferencing is done' complete -c ldapsearch -s l -x -d 'Set max number of seconds for a search to complete' complete -c ldapsearch -s z -x -d 'Set max number of entries for a search' complete -c ldapsearch -s f -r -d 'Read lines from file, performing one search for each' complete -c ldapsearch -s M -d 'Enable manage DSA IT control' complete -c ldapsearch -o MM -d 'Enable manage DSA IT with critical control' complete -c ldapsearch -s x -d 'Use simple authentication instead of SASL' complete -c ldapsearch -s D -x -d 'Specify Distinguished Name to bind to the LDAP directory' complete -c ldapsearch -s W -d 'Prompt for simple authentication' complete -c ldapsearch -s w -x -d 'Set password for simple authentication' complete -c ldapsearch -s y -r -d 'Use contents of file as password for simple authentication' complete -c ldapsearch -s H -x -d 'Specify URI(s) referring to the ldap server(s)' complete -c ldapsearch -s h -x -d 'Specify an alternate host' complete -c ldapsearch -s p -x -d 'Specify an alternate TCP port' complete -c ldapsearch -s P -xa '2 3' -d 'Specify the LDAP protocol version' complete -c ldapsearch -s e -x -d 'Specify general extensions' complete -c ldapsearch -s E -x -d 'Specify search extensions' complete -c ldapsearch -s o -x -d 'Specify general options' complete -c ldapsearch -s O -x -d 'Specify SASL security properties' complete -c ldapsearch -s I -d 'Enable SASL Interactive mode' complete -c ldapsearch -s Q -d 'Enable SASL Quiet mode' complete -c ldapsearch -s N -d 'Do not use reverse DNS to canonicalize SASL host name' complete -c ldapsearch -s U -x -d 'Specify the authentication ID for SASL bind' complete -c ldapsearch -s R -x -d 'Specify the realm of authentication ID for SASL bind' complete -c ldapsearch -s X -x -d 'Specify the requested authorization ID for SASL bind' complete -c ldapsearch -s Y -x -d 'Specify the SASL mechanism to be used for authentication' complete -c ldapsearch -s Z -d 'Issue StartTLS extended operation' complete -c ldapsearch -o ZZ -d 'Issue StartTLS ectended operation only if succesful'