]> Sergey Matveev's repositories - public-inbox.git/commitdiff
doc: lei: favor "-o format:$PATHNAME" over "-f"
authorKyle Meyer <kyle@kyleam.com>
Tue, 23 Feb 2021 03:45:52 +0000 (22:45 -0500)
committerEric Wong <e@80x24.org>
Tue, 23 Feb 2021 05:51:46 +0000 (01:51 -0400)
The --format argument is redundant and may be dropped entirely.
Update the lei manpages to prefer the format prefix.

cf. https://public-inbox.org/meta/20210217044032.GA17934@dcvr/

Documentation/lei-import.pod
Documentation/lei-overview.pod
Documentation/lei-q.pod

index 14ca2d45d6d8bfa17f85a95046a2acda05fbf9d2..2051e6bc86c5fd36b441f01ced436bc8745d5fd2 100644 (file)
@@ -11,8 +11,10 @@ lei import [OPTIONS] --stdin
 =head1 DESCRIPTION
 
 Import messages into the local storage of L<lei(1)>.  C<LOCATION> is a
-source of messages: a directory (Maildir) or a file (whose format is
-specified via C<--format>).
+source of messages: a directory (Maildir) or a file.  For a regular
+file, the location must have a C<E<lt>formatE<gt>:> prefix specifying
+one of the following formats: C<eml>, C<mboxrd>, C<mboxcl2>,
+C<mboxcl>, or C<mboxo>.
 
 TODO: Update when URL support is added.
 
@@ -22,8 +24,8 @@ TODO: Update when URL support is added.
 
 =item -f MAIL_FORMAT, --format=MAIL_FORMAT
 
-Message input format: C<eml>, C<mboxrd>, C<mboxcl2>, C<mboxcl>,
-C<mboxo>.
+Message input format.  Unless messages are given on C<stdin>, using a
+format prefix with C<LOCATION> is preferred.
 
 =item --stdin
 
index 840d011b27adb088851fe376962f93497b9a168e..62b62280ad2ddd69f28c4b401eb8a0270ffd250b 100644 (file)
@@ -16,7 +16,7 @@ L<public-inbox-v2-format(5)>.
 
 =over
 
-=item $ lei import --format=mboxrd t.mbox
+=item $ lei import mboxrd:t.mbox
 
 Import the messages from an mbox into the local storage.
 
@@ -64,7 +64,7 @@ Search for messages whose subject includes "lei" and "skeleton".
 Do the same, but also report unmatched messages that are in the same
 thread as a matched message.
 
-=item $ lei q -t -o t.mbox -f mboxcl2 --mua=mutt s:lei s:skeleton
+=item $ lei q -t -o mboxcl2:t.mbox --mua=mutt s:lei s:skeleton
 
 Write mboxcl2-formatted results to t.mbox and enter mutt to view the
 file by invoking C<mutt -f %f>.
index c8df6fc7244bfae68673b2506d7917f47f5d2317..75fdc613579cdc18d28f5589b4038eda65fb850b 100644 (file)
@@ -26,17 +26,25 @@ Read search terms from stdin.
 
 =item -o MFOLDER, --output=MFOLDER, --mfolder=MFOLDER
 
-Destination for results (e.g., C<path/to/Maildir> or - for stdout).
+Destination for results (e.g., C<path/to/Maildir> or
+C<mboxcl2:path/to/mbox>).  The format can be specified by adding a
+C<E<lt>formatE<gt>:> prefix with any of these values: C<maildir>,
+C<mboxrd>, C<mboxcl2>, C<mboxcl>, C<mboxo>, C<json>, C<jsonl>, or
+C<concatjson>.
+
+TODO: Provide description of formats?
+
+When a format isn't specified, it's chosen based on the destination.
+C<json> is used for the default destination (stdout), and C<maildir>
+is used for an existing directory or non-existing path.
 
 Default: -
 
 =item -f FORMAT, --format=FORMAT
 
-Format of results: C<maildir>, C<mboxrd>, C<mboxcl2>, C<mboxcl>,
-C<mboxo>, C<json>, C<jsonl>, or C<concatjson>.  The default format
-used depends on C<--output>.
-
-TODO: Provide description of formats?
+Format of results.  This option exists as a convenient way to specify
+the format for the default stdout destination.  Using a C<format:>
+prefix with the C<--output> destination is preferred otherwise.
 
 =item --pretty