Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
ZSH Local or Remote?
- X-seq: zsh-users 9713
- From: Steven Klass <sklass@xxxxxxxxxxxxxxx>
- To: zsh-users <zsh-users@xxxxxxxxxx>
- Subject: ZSH Local or Remote?
- Date: Sun, 27 Nov 2005 13:20:26 -0700
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Hi all,
Does anyone have a nice slick function to determine whether the
machine you are logged on to is local or remote? Basically you will
get the tty of the current shell and grep for this in who or pinky.
If you get :[0-9] you must be local.
Clearly this isn't bullet proof but I was wondering if any of you
had a really slick way of figuring this out..
Why you ask? If I am locally logged in I want to run keychain. If a
person is remote AND the machine is a trusted_machine I want to run
keychain. Otherwise don't...
Keep in mind this needs to run multiplatform - so be carefull which
command you use..
---
Steven Klass
sklass@xxxxxxxxxxxxxxx
(480) 988-5657
Messages sorted by:
Reverse Date,
Date,
Thread,
Author