From owner-freebsd-questions Mon Feb 17 9:41:18 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7481E37B401 for ; Mon, 17 Feb 2003 09:41:16 -0800 (PST) Received: from sccrmhc02.attbi.com (sccrmhc02.attbi.com [204.127.202.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3537243FCB for ; Mon, 17 Feb 2003 09:41:14 -0800 (PST) (envelope-from fearow@attbi.com) Received: from god.woofcat.com (12-251-110-17.client.attbi.com[12.251.110.17]) by sccrmhc02.attbi.com (sccrmhc02) with SMTP id <20030217174113002001iqcre>; Mon, 17 Feb 2003 17:41:13 +0000 Date: Mon, 17 Feb 2003 11:41:11 -0600 From: Anti To: Giorgos Keramidas Cc: david@skytracker.ca, questions@FreeBSD.ORG Subject: Re: shell prompt question Message-Id: <20030217114111.4fc32443.fearow@attbi.com> In-Reply-To: <20030217164036.GE10556@gothmog.gr> References: <20030216152524.A14300@skytrackercanada.com> <20030216214931.GB2106@gothmog.gr> <20030217104624.D28552@skytrackercanada.com> <20030217164036.GE10556@gothmog.gr> Organization: Woofcat X-Mailer: Sylpheed version 0.8.10 (GTK+ 1.2.10; i386-portbld-freebsd5.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 17 Feb 2003 18:40:36 +0200 Giorgos Keramidas wrote: > On 2003-02-17 10:46, David Banning wrote: > > > The way that the shell prompt is set depends on the particular shell. > > > What shell does your `david' user have? What shell does `root' have? > > > > they both use bash. > > > > > > > > > How do I get the super-user prompt when I just use the "su" command > > > > rather than the full "su -" command? > > > > > > The default behavior of su is to run an interactive, but not login, > > > shell AFAIK. How to set the prompt for interactive invocations of > > > your root user's shell depends on the shell. > > I took out my "PS1=david$" line in my .profile, and now I have it working > > again. My user shell is simply "bash-2.03$" and my su shell is > > "su-2.03#". > > > > Thanks for your help. > > You're welcome :) > > Don't explicitly set a '$' in your PS1 if you want bash to have > control of your superuser/simple-user changes. Use this instead: > > PS1='david\$' > > and see if it looks better. For more \X escape sequences that you can > use in your PS1, look at the manpage of bash. or probably better in this case PS1='\u\$ ' i prefer PS1='[\u \W]\$ ' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message