Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Differrent prompt for remote machines
- X-seq: zsh-users 3791
- From: Matt Pharr <mmp@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxx
- Subject: Re: Differrent prompt for remote machines
- Date: 02 Apr 2001 13:46:39 -0700
- In-reply-to: <20010330114228.O1115@xxxxxxxxxxx> (Dominik Vogt's message of "Fri, 30 Mar 2001 11:42:28 +0200")
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20010330114228.O1115@xxxxxxxxxxx>
Dominik Vogt <d.vogt@xxxxxxxxxxx> writes:
> I'm often logged in to different machines that all share the
> same zsh configuration files (via ssh or telnet). But I
> frequently forget on which machine I am, mainly because either
> I have the machine name in my promt for all machines or for no
> machine at all. What I'd like to have is this:
>
> For the machine at which I logged in:
>
> <username> ...
>
> and
>
> <username>@<machine> ...
I've got the following, which seems to catch that well in my setup, at
least.
if [[ $SSH_CLIENT = *.* || $REMOTEHOST = *.* ]] then
PROMPT='<%m> %B%#%b '
else
PROMPT='%B%#%b '
fi
-matt
--
Matt Pharr | Exluna, Inc. | <URL:http://graphics.stanford.edu/~mmp>
===============================================================================
In a cruel and evil world, being cynical can allow you to get some
entertainment out of it. --Daniel Waters
Messages sorted by:
Reverse Date,
Date,
Thread,
Author