From owner-freebsd-questions@FreeBSD.ORG Tue Nov 24 11:57:08 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45E5E1065670 for ; Tue, 24 Nov 2009 11:57:08 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 05CB08FC15 for ; Tue, 24 Nov 2009 11:57:07 +0000 (UTC) Received: from r55.edvax.de (port-92-195-118-14.dynamic.qsc.de [92.195.118.14]) by mx01.qsc.de (Postfix) with ESMTP id E88F03CE05; Tue, 24 Nov 2009 12:57:05 +0100 (CET) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id nAOBv52c001472; Tue, 24 Nov 2009 12:57:05 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Tue, 24 Nov 2009 12:57:05 +0100 From: Polytropon To: Ruben de Groot 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> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD Questions Subject: Re: Prompt containing SSH login information X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 11:57:08 -0000 On Tue, 24 Nov 2009 12:19:45 +0100, Ruben de Groot 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, ...