Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Why can't I get my remote host into a variable?



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



Messages sorted by: Reverse Date, Date, Thread, Author