zsh-users
 help / color / mirror / code / Atom feed
* ZSH Local or Remote?
@ 2005-11-27 20:20 Steven Klass
  2005-11-27 21:02 ` Brian K. White
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Klass @ 2005-11-27 20:20 UTC (permalink / raw)
  To: zsh-users

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@pointcircle.com
(480) 988-5657


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-11-27 21:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-27 20:20 ZSH Local or Remote? Steven Klass
2005-11-27 21:02 ` Brian K. White
2005-11-27 21:34   ` Brian K. White

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).