[m-rev.] Added vim directory to distribution

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Mar 14 16:32:36 AEDT 2002


On 14-Mar-2002, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> Fergus Henderson, Wednesday, 13 March 2002:
> > > 
> > > +% $([ -n "$USERNAME" ] && echo $USERNAME "")<$USER@$(hostname -d)>
> > 
> > Using `whoami` is probably more reliable than checking $USERNAME
> 
> On ceres, at least, whoami simply returns `rafe'.

Yes, `whoami` just returns the user name.
To get a full address, you need to use `hostname` as well:

		`whoami`@`hostname -f`

Or alternatively, use environment variables by default,
with `whoami` and `hostname` as fallbacks:

		${USERNAME-`whoami`}@${FROM_HEADER-`hostname -f`}

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list