From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.6) Gecko/20050223 Firefox/1.0.1 Description of problem: Hello, it seems that PuTTY 0.57 has problems with PS1 and PROMPT_COMMAND. Whenever I type some text, press Home and End some times, the text gets mixed up. See attached screenshot. The prompt in Red Hat Enterprise Linux is as follows: if [ "$PS1" ]; then case $TERM in xterm*) if [ -e /etc/sysconfig/bash-prompt-xterm ]; then PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm else PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"' fi ;; 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/~}\033\\"' fi ;; *) [ -e /etc/sysconfig/bash-prompt-default ] && PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default ;; esac Florian Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: See above. Additional info:
Created attachment 111714 [details] screenshot
*** Bug 150437 has been marked as a duplicate of this bug. ***
What does 'echo $TERM' say?
I tried with TERM=screen and TERM=xterm
Well, I meant if you don't set it yourself, but the documentation answers me: ==> A.5.1 What terminal type does PuTTY use? For most purposes, PuTTY can be considered to be an xterm terminal. [...] By default, PuTTY announces its terminal type to the server as xterm. If you have a problem with this, you can reconfigure it to say something else; vt220 might help if you have trouble. <== If this doesn't set your window title to show user 'foo': (USER=foo eval "$PROMPT_COMMAND"; sleep 5) then it's a PuTTY bug I think.
With TERM=screen, it doesn't work, see attached screenshot.
Created attachment 111756 [details] screenshot