nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] Request for new command: addresses


From: Ralph Corderoy
Subject: Re: [Nmh-workers] Request for new command: addresses
Date: Tue, 27 May 2014 13:24:37 +0100

Hi Paul,

> > The command would operate on one or more messages. Its arguments
> > would be like the arguments of almost all the nmh commands that
> > operate on one more more messages, with the default being cur. It
> > would output, to its stdout, all the addressees, including comments,
> > of all the messages. There need be no guaranteed order. Nor need
> > there be any culling of duplicates. I don't require but would not
> > object to support of -cc all/to/cc/me -nocc all/to/cc/me.
> 
> does this do what you want?

I went for a similar idea, though my ancient pick has no -noseq.  Then I
plumped for bash to get pipefail, aiming to have $? be non-zero if the
sequence doesn't exist, e.g. there's no current message.

    #! /bin/bash

    set -eEu -o pipefail

    (($#)) || set cur

    scan -format '%(msg)' "$@" |
    while read n; do
        yes n |
        repl -cc all -query -editor false $n 2>/dev/null || true
    done |
    sed -r 's/\<Reply to ([^?]+)\? /\1\n/g'

BTW, from testing I find it annoying that `mark -s cur -d cur' gives no
error and $? is 0 yet cur remains set.  What benefit does this have, I
wonder?

Cheers, Ralph.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]