From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: who runs commands from their $EDITOR?
Date: Fri, 17 Sep 2021 08:44:25 +0000 [thread overview]
Message-ID: <20210917084425.GA29575@dcvr> (raw)
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
next reply other threads:[~2021-09-17 8:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-17 8:44 Eric Wong [this message]
2021-09-18 3:23 ` who runs commands from their $EDITOR? Kyle Meyer
2021-09-18 6:23 ` Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210917084425.GA29575@dcvr \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).