From owner-freebsd-questions@FreeBSD.ORG Wed May 18 10:37:38 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 4CC8C16A4CE for ; Wed, 18 May 2005 10:37:38 +0000 (GMT) Received: from post-22.mail.nl.demon.net (post-22.mail.nl.demon.net [194.159.73.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id D994A43DB1 for ; Wed, 18 May 2005 10:37:37 +0000 (GMT) (envelope-from albi@scii.nl) Received: from aseed.demon.nl ([83.160.138.119]:10026 helo=mail.aseed.antenna.nl) by post-22.mail.nl.demon.net with esmtp (Exim 4.43) id 1DYLvi-000OdQ-1x; Wed, 18 May 2005 10:37:34 +0000 Received: from http.aseed.antenna.nl (unknown [192.168.0.50]) by mail.aseed.antenna.nl (Postfix) with ESMTP id 1103515413D; Wed, 18 May 2005 12:41:21 +0200 (CEST) Received: from amandla.scii.nl (217-19-30-147.dsl.cambrium.nl [217.19.30.147]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by http.aseed.antenna.nl (Postfix) with ESMTP id 12BBF58C82F; Wed, 18 May 2005 12:37:34 +0200 (CEST) Date: Wed, 18 May 2005 12:37:33 +0200 From: albi To: Gerard Seibert Message-Id: <20050518123733.44e79cd5.albi@scii.nl> In-Reply-To: References: X-Mailer: Sylpheed version 1.9.10 (GTK+ 2.6.7; i386-portbld-freebsd5.3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org 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 10:37:38 -0000 On Wed, 18 May 2005 06:26:53 -0400 (Eastern Standard Time) Gerard Seibert wrote: > PS1="\u@\h \w " > case 'id -u' in > 0) PS1="${PS1}# ";; > *) PS1="${PS1}$ ";; > esac --- cut --- > 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. this is what i use : case $UID in 0) PS1="\[\033[1;31m\][ \u@\h:\w] #\[\033[0m\] ";; *) PS1="\[\033[2;36m\][ \u@\h:\w] $\[\033[0m\] ";; esac you could use this and remove the colours if you like