Date: Mon, 17 Feb 2003 11:41:11 -0600 From: Anti <fearow@attbi.com> To: Giorgos Keramidas <keramida@ceid.upatras.gr> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 17 Feb 2003 18:40:36 +0200 Giorgos Keramidas <keramida@ceid.upatras.gr> wrote: > On 2003-02-17 10:46, David Banning <david@skytracker.ca> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030217114111.4fc32443.fearow>