From owner-freebsd-questions Mon Feb 17 8:42:10 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 424F637B401 for ; Mon, 17 Feb 2003 08:42:09 -0800 (PST) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF84643F85 for ; Mon, 17 Feb 2003 08:42:07 -0800 (PST) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-b192.otenet.gr [212.205.244.200]) by mailsrv.otenet.gr (8.12.6/8.12.6) with ESMTP id h1HGec9c021027; Mon, 17 Feb 2003 18:40:45 +0200 (EET) Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.7/8.12.7) with ESMTP id h1HGecSw011980; Mon, 17 Feb 2003 18:40:38 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.12.7/8.12.7/Submit) id h1HGeaTQ011979; Mon, 17 Feb 2003 18:40:36 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Mon, 17 Feb 2003 18:40:36 +0200 From: Giorgos Keramidas To: David Banning Cc: questions@FreeBSD.ORG Subject: Re: shell prompt question Message-ID: <20030217164036.GE10556@gothmog.gr> References: <20030216152524.A14300@skytrackercanada.com> <20030216214931.GB2106@gothmog.gr> <20030217104624.D28552@skytrackercanada.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030217104624.D28552@skytrackercanada.com> 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 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. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message