On 10/19/05, Maarten Th. Mulders <[EMAIL PROTECTED]> wrote:
> I don't have X installed, so the problem only occurred on the terminal.
> Yes, I just wrote "occured" because when I did
>
> mv /etc/profile.d/extra-prompt.sh{,.off}

Alright, I dug a bit.  Bruce is right, PROMPT_COMMAND is executed
before every prompt in bash, so it supplements PS1.  See
http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x264.html

Now, to get the behavior where PROMPT_COMMAND shows up in the title of
an xterm, it has to be changed a bit.  In BLFS, it is:
PROMPT_COMMAND='echo -ne "[EMAIL PROTECTED] : ${PWD}\e[0m\a"'

This does exactly as it says and echo's [EMAIL PROTECTED] : ${PWD}
before $PS1.  To put this in the title of a terminal, change to
PROMPT_COMMAND='echo -ne "\033]0;[EMAIL PROTECTED]: ${PWD}\007"'

The \033]0; and \007 send the input to the title of the terminal.  I
don't know if this will cause problems on the linux console or not. 
I'm ssh'ing in through an xterm right now.  Try changing that line in
/etc/profile.d/extra-prompt.sh and moving it back to having just the
extension .sh.  Let me know if that works because it's been bugging me
for a long time.

--
Dan
--
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