zsh-users
 help / color / mirror / code / Atom feed
From: Steven Klass <sklass@pointcircle.com>
To: zsh-users <zsh-users@sunsite.dk>
Subject: ZSH Local or Remote?
Date: Sun, 27 Nov 2005 13:20:26 -0700	[thread overview]
Message-ID: <E3336F7C-77CC-4670-8EE9-5911598B9B23@pointcircle.com> (raw)

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


             reply	other threads:[~2005-11-27 20:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-27 20:20 Steven Klass [this message]
2005-11-27 21:02 ` Brian K. White
2005-11-27 21:34   ` Brian K. White

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E3336F7C-77CC-4670-8EE9-5911598B9B23@pointcircle.com \
    --to=sklass@pointcircle.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).