From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18942 invoked from network); 1 Dec 2005 00:53:10 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 1 Dec 2005 00:53:10 -0000 Received: (qmail 4369 invoked from network); 1 Dec 2005 00:53:04 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 1 Dec 2005 00:53:04 -0000 Received: (qmail 9117 invoked by alias); 1 Dec 2005 00:52:57 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9726 Received: (qmail 9041 invoked from network); 1 Dec 2005 00:51:16 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 1 Dec 2005 00:51:16 -0000 Received: (qmail 2706 invoked from network); 1 Dec 2005 00:51:16 -0000 Received: from g.primenet.com.au (203.24.36.10) by a.mx.sunsite.dk with SMTP; 1 Dec 2005 00:51:15 -0000 Received: (qmail 6070 invoked by uid 100); 1 Dec 2005 00:51:09 -0000 Date: Thu, 1 Dec 2005 11:51:09 +1100 From: Geoff Wing To: Zsh Users Subject: Re: Why can't I get my remote host into a variable? Message-ID: <20051201005109.GA6312@primenet.com.au> References: <438E4667.6000307@tntluoma.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <438E4667.6000307@tntluoma.com> Organization: PrimeNet Computer Consultancy User-Agent: Mutt/1.5.11 On Thursday 2005-12-01 11:40 +1100, Lists output: :Zsh 4.2.5 on FreeBSD. I'm ssh'ing into the FreeBSD machine. You're presuming that the utmp/x is updated by the time zsh runs. I wouldn't. It's most likely to be asynchronous. Instead, see which environmental variables sshd provides for you: i.e. check if SSH_CLIENT or SSH_CONNECTION is available to you and parse one of them. Regards, Geoff