Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Jan 2000 00:19:29 -0800 (PST)
From:      baron@penguinpowered.com
To:        freebsd-questions@freebsd.org
Subject:   \$ in bash (was Re: window manager question)
Message-ID:  <20000106081929.6417.qmail@tatooine.primus.ca>

next in thread | raw e-mail | index | archive | help
>There is only one problem.  My .rc files have this setup, as you
>described, but modified for bash:

>if [[ $EUID -eq 0 ]]; then
>       PS1="root@\h\w\$"
>else
>       PS1="joseph@\h\w\$"
>fi
>According to the man page on bash, the "$" is supposed to show up as "#"
>if uid is 0, otherwise it will show as "$".  It doesn't do this,
>however.  It always shows up as "$", regardless of uid.

I'd recommend adding this line to your ~/.bashrc 

export PS1='\u@\h\w\$ '

This works wonderfully for me, hope it does the same for you.

Cheers,

Michael Coulter


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?20000106081929.6417.qmail>