Whoops, you are quite correct Ralph! Somehow I had convinced
myself I was using backward references in my own aliases file.
Sigh, time to get more sleep, I think. B-) Thanks for clearing
things up for me!
By the way, in my "ancient" Ubuntu running nmh 1.5, the relevant
part of the man page for mh-alias(5) has for the example:
Example Alias File:
</etc/nmh/BBoardAliases
sgroup: fred, fear, freida
b-people: Blind List: bill, betty;
fred: frated@UCI
UNIX-committee: <unix.aliases
staff: =staff
wheels: +wheel
everyone: *
news.*: news
The first line says that more aliases should immediately be read from
the file /etc/nmh/BBoardAliases. Following this, “fred” is defined as
an alias for “frated@UCI”, and “sgroup” is defined as an alias for the
three names “frated@UCI”, ”fear”, and ”freida”.
The example shows the correct order in defining sgroup and fred,
though the explanation below the example is incorrect (and is
identical to the latest version in Savannah).
Looks like it was Lyndon's commit in 2013 May 25 (commit ID
ff3060cefb460cce2174058eefff38b6e11ee2f1 ["Clean up mh-alias(5)
manpage."] that changed it, by moving the "fred" definition to
match the explanation:
% git log ff3060ce | head -13
commit ff3060cefb460cce2174058eefff38b6e11ee2f1
Author: Lyndon Nerenberg <lyndon(_at_)orthanc(_dot_)ca>
Date: Sat May 25 20:14:04 2013 -0700
Clean up mh-alias(5) manpage.
Word-smithing, update to use *.example domains for addresses,
literal text in bold rather than italic, use typographers quotes on
single character references, etc.
Re-organize sections to match documentation convention.
Mark "*" address-group as obsolescent.
% git diff ff3060ce^ ff3060ce | grep -B 5 -A 8 fred | head -14
+Example Alias File
.PP
.RS 5
.nf
<%etcdir%/BBoardAliases
+fred: frated@UCI.example
sgroup: fred, fear, freida
b-people: Blind List: bill, betty
-fred: frated@UCI
UNIX\-committee: <unix.aliases
staff: =staff
wheels: +wheel
-everyone: *
news.*: news
In that same commit, the explanation of the news.*: alias was
removed, as it was part of a 2-sentence paragraph that started
with the explanation of the everyone: alias (removed because the
match-everything "*" option was made obsolete):
Finally, “everyone” is defined as all users with a user-id in
/etc/passwd greater than 200, and all aliases of the form
“news.<anything>” are defined to be “news”.
(There were many other changes to this man page in this commit.)
Bob
On Thu, 13 Apr 2017 12:02:58 +0100 Ralph Corderoy
<ralph(_at_)inputplus(_dot_)co(_dot_)uk> sez:
Hi Bob,
I agree the man page example doesn't seem to match the page's
definition, but I think the example and the explanation that follows is
wrong.
$ sed 4q ~/mail/aliases
x1: x2
x2: x2(_at_)example(_dot_)com
x3: x3(_at_)example(_dot_)com
x4: x3
$
$ ali | grep '^x[1-4]:'
x1: x2(_at_)example(_dot_)com
x2: x2(_at_)example(_dot_)com
x3: x3(_at_)example(_dot_)com
x4: x3
$
x1 is a forward reference and gets fully expanded.
x4 is a backward reference and does not.
I'm confused by mh-alias(5) saying
In match, a trailing “*” on an alias will match just about anything
appropriate.
What `match'? mh-format(5)'s function match()? No, it seems to mean
the match that's done to find the alias definition.
And then the example you quoted ends
news.*: news
but that isn't explained in the following text. A brief experiment:
$ sed 2q ~/mail/aliases
news: oldnews
news.*: news
$ ali news
oldnews
$ ali news.
news
$ ali news.foo
news
$
--
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy
_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers