Ag. Hatzimanikas wrote:
> would rather see a different color prompt for the root (red) and for
> user (green maybe) - for obvious reasons.
>
> if [[ ${EUID} == 0 ]] ; then
> PS1='\e[0;[EMAIL PROTECTED]:\e[0;39m\w\$ '
> else
> PS1='\e[0;[EMAIL PROTECTED]:\e[0;39m\w\$ '
> fi
>
>
hmmm, those confuse my cursor, especially in history. Up-arrow is
really a crap shoot.
I use this, cobbled up from an old, (really old) Gentoo I believe.
PS1='\[\e[1;32m\]\u [ \[\e[00m\]\w \[\e[1;32m\]]\$ \[\e[00m\]'
I don't know why the escaped bracing helps.
Also the'\e[00m' restores default rather than the \e[0;39m you have used.
'1;' I use for bright colors.
whatever
---
David Jensen
--
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page