Here's the accompanying documentation diff for the restructure.

diff --git a/ldap.1 b/ldap.1
index bb65ea4..0225f78 100644
--- a/ldap.1
+++ b/ldap.1
@@ -40,30 +40,10 @@ The
 .Nm
 utility is a simple LDAP client.
 It queries an LDAP server to perform a command and outputs the results
-in the LDAP Data Interchange Format (LDIF).
-.Bl -tag -width Ds
-.It Cm search Ar options Oo Ar filter Oc Op Ar attributes ...
-Perform a directory search request.
-The optional
-.Ar filter
-argument specifies the LDAP filter for the directory search.
-The default is
-.Ar (objectClass=*)
-and the format must comply to the
-.Dq String Representation of Search Filters
-as described in RFC 4515.
-If one or more
-.Ar attribute
-options are specified,
-.Nm
-restricts the output to the specified attributes.
-.El
+if applicable.
 .Pp
-The options are as follows:
+All commands support the following options:
 .Bl -tag -width Ds
-.It Fl b Ar basedn
-Use the specified distinguished name (dn) as the starting point for
-directory search requests.
 .It Fl c Ar CAfile
 When TLS is enabled, load the CA bundle for certificate verification
 from the specified file.
@@ -95,7 +75,8 @@ Each of
 .Ar basedn , attribute , scope
 and
 .Ar filter
-may be omitted,
+may be omitted and are ignored for any other command besides
+.Cm search,
 but the preceding
 .Sq /
 or
@@ -123,6 +104,52 @@ The host argument is required to be a URL-encoded path, 
for example
 for
 .Pa /var/run/ldapi .
 .El
+.It Fl v
+Product more verbose output.
+.It Fl W
+Prompt for the bind secret with echo turned off.
+.It Fl w Ar secret
+Specify the bind secret on the command line.
+.It Fl x
+Use simple authentication.
+This is the default as
+.Nm
+does not support SASL authentication.
+.It Fl y Ar secretfile
+Read the bind secret from the first line of the specified file or from
+standard input if the
+.Ar secretfile
+argument is
+.Sq - .
+The file must not be world-readable if it is a regular file.
+.It Fl Z
+Enable TLS using the StartTLS operation.
+.El
+.Ss SEARCH
+The
+.Cm search
+command performs a directory search request.
+The optional
+.Ar filter
+argument specifies the LDAP filter for the directory search.
+The default is
+.Ar (objectClass=*)
+and the format must comply to the
+.Dq String Representation of Search Filters
+as described in RFC 4515.
+If one or more
+.Ar attribute
+options are specified,
+.Nm
+restricts the output to the specified attributes.
+.Pp
+The
+.Cm search
+specific options are as follows:
+.Bl -tag -width Ds
+.It Fl b Ar basedn
+Use the specified distinguished name (dn) as the starting point for
+directory search requests.
 .It Fl L
 Output the directory search result in a standards-compliant version of
 the LDAP Data Interchange Format (LDIF).
@@ -152,26 +179,6 @@ or
 The default is
 .Ic sub
 for subtree searches.
-.It Fl v
-Product more verbose output.
-.It Fl W
-Prompt for the bind secret with echo turned off.
-.It Fl w Ar secret
-Specify the bind secret on the command line.
-.It Fl x
-Use simple authentication.
-This is the default as
-.Nm
-does not support SASL authentication.
-.It Fl y Ar secretfile
-Read the bind secret from the first line of the specified file or from
-standard input if the
-.Ar secretfile
-argument is
-.Sq - .
-The file must not be world-readable if it is a regular file.
-.It Fl Z
-Enable TLS using the StartTLS operation.
 .It Fl z Ar sizelimit
 Request the server to limit the search result to a maximum number of
 .Ar sizelimit

Reply via email to