From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27418 invoked from network); 30 Mar 2001 15:57:39 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 30 Mar 2001 15:57:39 -0000 Received: (qmail 15817 invoked by alias); 30 Mar 2001 15:57:26 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3778 Received: (qmail 15799 invoked from network); 30 Mar 2001 15:57:25 -0000 From: "Bart Schaefer" Message-Id: <1010330155557.ZM4296@candle.brasslantern.com> Date: Fri, 30 Mar 2001 15:55:57 +0000 In-Reply-To: <20010330124813.A10985@lifebits.de> Comments: In reply to Dominik Vogt "Re: Differrent prompt for remote machines" (Mar 30, 12:48pm) References: <20010330114228.O1115@lifebits.de> <20010330124813.A10985@lifebits.de> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-users@sunsite.auc.dk Subject: Re: Differrent prompt for remote machines MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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