[CentOS] format level 3 prompt

Wed Nov 18 16:22:44 UTC 2009
m.roth at 5-cent.us <m.roth at 5-cent.us>

> On Wed, 18 Nov 2009 08:25:48 -0700, m.roth-x6lchVBUigD1P9xLtpHBDw wrote:
> [...]
>>
>> Ah! Permission/ownership problem?
>>
> Good suggestion.  I found that for myUser .bashrc had the wrong
> permissions and .bash_profile was missing!  I am sure that this
> happened because I copied /home/myUser was copied in from backup
> before the account was created.  We won't do that again.
>
> But now, I still do not see how the prompt is set since I have
> no /etc/sysconfig/bash-prompt-default .

>From the code /etc/bashrc:
<...>
    screen)
        if [ -e /etc/sysconfig/bash-prompt-screen ]; then
            PROMPT_COMMAND=/etc/sysconfig/bash-prompt-screen
        else
        PROMPT_COMMAND='echo -ne
"\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}"; echo -ne "\033\\"'
        fi
        ;;
<...>

         mark