Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Nov 2009 12:57:05 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Ruben de Groot <mail25@bzerk.org>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Prompt containing SSH login information
Message-ID:  <20091124125705.7543562f.freebsd@edvax.de>
In-Reply-To: <20091124111945.GA80567@ei.bzerk.org>
References:  <20091124051038.1aef9ade.freebsd@edvax.de> <20091124111945.GA80567@ei.bzerk.org>

index | next in thread | previous in thread | raw e-mail

On Tue, 24 Nov 2009 12:19:45 +0100, Ruben de Groot <mail25@bzerk.org> wrote:
> In tcsh there's the REMOTEHOST env variable. Don't know about bash.
> Something like:
> 
> set prompt = "${USER}@${HOST}>${REMOTEHOST}> "
> 
> should do it?

That's an approach, it it makes the "upper stage" visible;
it works in bash, too.

For interactive shells, I would include a test if $REMOTEHOST
is set, and if it is, then it's a SSH session, so a different
prompt has to be set.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091124125705.7543562f.freebsd>