user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
* who runs commands from their $EDITOR?
@ 2021-09-17  8:44 Eric Wong
  2021-09-18  3:23 ` Kyle Meyer
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Wong @ 2021-09-17  8:44 UTC (permalink / raw)
  To: meta

Just wondering, is this a common thing for other *nix users?
It's been second nature to me for decades, now.  Even nvi
supports it (not just vim), so it's not new...

I find it immensely useful to pipe lines with Message-IDs
or "Link: $URL" in them to "lei lcat".

--------8<------
Subject: [PATCH] doc: lei-lcat: document --stdin behavior

This is another feature I've found immensely useful,
but I also wonder if I'm the only one who uses it.
---
 Documentation/lei-lcat.pod | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/Documentation/lei-lcat.pod b/Documentation/lei-lcat.pod
index b7887b6c..ea883e65 100644
--- a/Documentation/lei-lcat.pod
+++ b/Documentation/lei-lcat.pod
@@ -13,7 +13,7 @@ lei lcat [OPTIONS] (--stdin|-)
 lcat (local cat) is a wrapper around L<lei-q(1)> that displays local
 messages by Message-ID.  It is able to extract Message-IDs from URLs
 as well as from common formats such as C<E<lt>$MSGIDE<gt>> and
-C<id:$MSGID>.  When reading from stdin, input that isn't understood is
+C<id:$MSGID>.  When reading from C<stdin>, input that isn't understood is
 discarded, so the caller doesn't have to bother extracting the
 Message-ID or link from surrounding text (e.g., a "Link: $URL" line).
 
@@ -33,6 +33,15 @@ Most commonly C<text> (the default) or C<reply> to
 display the message(s) in a format suitable for trimming
 and sending as a email reply.
 
+=item --stdin
+
+=item -
+
+C<lei lcat> implicitly reads from C<stdin> if it is a L<pipe(7)>
+or regular file.  This is handy for invoking C<lei lcat> from
+inside an C<$EDITOR> session (assuming you use an C<$EDITOR>
+which lets you pipe arbitrary lines to arbitrary commands).
+
 =item --[no-]remote
 
 =item --no-local

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-18  6:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-17  8:44 who runs commands from their $EDITOR? Eric Wong
2021-09-18  3:23 ` Kyle Meyer
2021-09-18  6:23   ` Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).