Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Differrent prompt for remote machines
- X-seq: zsh-users 3778
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxx
- Subject: Re: Differrent prompt for remote machines
- Date: Fri, 30 Mar 2001 15:55:57 +0000
- In-reply-to: <20010330124813.A10985@xxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20010330114228.O1115@xxxxxxxxxxx> <Pine.SV4.4.33.0103301353030.29329-100000@xxxxxxxxxxxxxxxxxxxxx> <20010330124813.A10985@xxxxxxxxxxx>
On Mar 30, 12:48pm, Dominik Vogt wrote:
}
} On Fri, Mar 30, 2001 at 01:59:33PM +0400, Andrej Borsenkow wrote:
} > On Fri, 30 Mar 2001, Dominik Vogt wrote:
} >
} > > Basically it breaks down to detecting if the shell runs on a
} > > local terminal or through a network connection.
} >
} > One possibility is to use finger (is it available on all systems?)
} > Solaris supports who -m
There's also `last -adn 1 $LOGNAME' on linux, which will attempt to reverse
map an IP address if the remote host name is not stored in wtmp.
} Thanks, I got it working with 'who -m | cut -d "!" -f 1'.
Quicker is ${"$(who -m)"%%\!*}
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author