From owner-freebsd-questions@FreeBSD.ORG Wed May 18 12:37:53 2005 Return-Path: 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 2B53B16A4CE for ; Wed, 18 May 2005 12:37:53 +0000 (GMT) Received: from longbow.arroway.com (mymortgageforeclosures.com [66.252.139.194]) by mx1.FreeBSD.org (Postfix) with SMTP id A102A43DD4 for ; Wed, 18 May 2005 12:37:51 +0000 (GMT) (envelope-from stormspotter@6Texans.net) Received: (qmail 23011 invoked by uid 1007); 18 May 2005 12:37:46 -0000 Received: from stormspotter@6Texans.net by longbow by uid 1004 with qmail-scanner-1.22-st-qms (clamdscan: 0.81. spamassassin: 2.64. Clear:RC:1(216.87.134.162):. Processed in 0.356479 secs); 18 May 2005 12:37:46 -0000 Received: from unknown (HELO jacob.6texans.net) (216.87.134.162) by longbow.arroway.com with SMTP; 18 May 2005 12:37:45 -0000 Date: Wed, 18 May 2005 07:37:44 -0500 From: Jacob S To: freebsd-questions@freebsd.org Message-ID: <20050518073744.493b18c3@jacob.6texans.net> In-Reply-To: References: X-Mailer: Sylpheed-Claws 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: Bash: Setting Prompt X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 May 2005 12:37:53 -0000 On Wed, 18 May 2005 06:26:53 -0400 (Eastern Standard Time) Gerard Seibert wrote: > FreeBSD 5.4 and Bash 3.00.16(1) > > I hope that this is the right place to post this. > > I have the following in my '.bash_profile' file. > # > # Set the prompt to display the 'user@host' and the working > # directory with a '#' for root and '$' for user. > # > PS1="\u@\h \w " > case 'id -u' in > 0) PS1="${PS1}# ";; > *) PS1="${PS1}$ ";; > esac > # > # Keep the environment when using su to become root > # > alias su='su -m' > # > It is suppose to set the prompt to display the 'user@host' and the > working directory with a '#' for root and '$' for user. Everything > works except for the '#' and '$' symbols. The '$' symbol is always > displayed. > > I must be doing something really stupid, but I do not know what. I > hope that someone can assist me. Just a guess, as I haven't tested this, but try changing your case line to look like this: case `id -u` in (Note the backticks instead of apostrophes.) HTH, Jacob