nmh-workers
[Top] [All Lists]

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

2014-05-27 07:25:09
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.

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>