On 11/14/05, IraqiGeek <[EMAIL PROTECTED]> wrote: > My problem is that if I customize the the prompt, I will still get a > [EMAIL PROTECTED]: /PATH before any prompt string that I set. Imagine this if > I am > in a subdirectory, the prompt will be something like this: > > [EMAIL PROTECTED]:/[EMAIL PROTECTED]:/etc/sysconfig/network-devices# > > What can be the cause of the duplicate prompt, which is the first since I go > back to the prompt I mentioned in the original post when I comment the > export PS1 lines in /etc/bashrc and /etc/profile.
In Ch. 3 Bash Shell Startup Files, there is a file created /etc/profile.d/extra-prompt.sh. Read that section again. There's a variable called PROMPT_COMMAND that's being executed just before PS1, and it's echoing the "[EMAIL PROTECTED]:/root" part to your prompt. To remove this, and completely control the prompt through PS1, add unset PROMPT_COMMAND to ~/.bashrc. Or, change the suffix of extra-prompt.sh to something else like /etc/profile.d/extra-prompt.sh.off and it won't execute at login. It's added to the book as an example, but unfortunately the example used doesn't produce good results as is. Search the blfs-support mailing lists for PROMPT_COMMAND to find some more better ways to use it. -- Dan -- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page