Prompt containing SSH login information
Polytropon
freebsd at edvax.de
Tue Nov 24 11:57:08 UTC 2009
On Tue, 24 Nov 2009 12:19:45 +0100, Ruben de Groot <mail25 at 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, ...
More information about the freebsd-questions
mailing list