1

If I scroll up through the history and come across a long line that wraps, then scroll back down, the lines will be scrambled.

I have read around that this can be caused by incorrectly escaping color codes, but this happens even with an empty PS1, e.g.

export PS1=""

In response to comment

echo "[$PROMPT_COMMAND]"
[]
echo "[$PS1]"
[]
4

1 回答 1

1

只需按下Ctrl+L即可刷新显示。

我认为问题更多在于Bash不知道长命令被分成多行。

于 2013-04-24T20:04:12.600 回答