From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id BB2C01F8C8 for ; Fri, 17 Sep 2021 08:44:25 +0000 (UTC) Date: Fri, 17 Sep 2021 08:44:25 +0000 From: Eric Wong To: meta@public-inbox.org Subject: who runs commands from their $EDITOR? Message-ID: <20210917084425.GA29575@dcvr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline List-Id: 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 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$MSGIDE> and -C. When reading from stdin, input that isn't understood is +C. When reading from C, 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 (the default) or C to display the message(s) in a format suitable for trimming and sending as a email reply. +=item --stdin + +=item - + +C implicitly reads from C if it is a L +or regular file. This is handy for invoking C 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