On Fri, Jul 27, at 09:07 Craig Jackson wrote:
> Hello,
> 
> In BLFS-6.2, Chapter 3 - The Bash Startup Files, the
> /etc/profile.d/extra-prompt.sh provides interesting results.  I must
> have had this problem a dozen times now, and since it is a simple fix
> haven't reported it until now.  As written, if the user follows the
> entire instructions on the page to the letter, the following prompt is
> produced:
> 
> @viper : /[EMAIL PROTECTED]:/#
> 
> As soon as /etc/profile.d/extra-prompt.sh is removed, the prompt looks
> much more readable and reasonable:
> 
> [EMAIL PROTECTED]:/#
> 
> I looked hard for any warnings about this.  I'm wondering what the
> true purpose of the extra-prompt.sh script is.  I'm a big fan of a
> colorful but simple prompt, but this one seems broken in the way it is
> implemented.
> 

To be honest I also find this script useless, even for demonstration.
So if there is no objection I will remove this script from the 
"Bash Startup Files" page, unless someone has some use of it.

Also, we had a discussion a while ago, to fix some issues in that same 
page.

For instance, we can set up different colors in prompt for root and for
users (red and green respectively) and then to avoid exporting the
PS1 variable as it was discussed in that old thread.

Does this prompt (in /etc/profile) looks good to you? (it was suggested by 
David Jensen)

if [[ ${EUID} == 0 ]] ; then
        PS1='\[\e[1;31m\]\u [ \[\e[00m\]\w \[\e[1;31m\]]\$ \[\e[00m\]'
        else
        PS1='\[\e[1;32m\]\u [ \[\e[00m\]\w \[\e[1;32m\]]\$ \[\e[00m\]'
fi

Comments for the prompt and the removal of the extra-prompt.sh script and
additional suggestions for that same page are welcomed, especially since I
am not using Bash and I am not really sure for the expected results.
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to