Wrong color within Bash PS1 upon iTerm2 resize
Thanks for filing an issue! Please answer the questions below so I can help you.
- iTerm2 version: 3.0.15
- OS version: 10.12.4 (16E195)
- Attachcom.googlecode.iterm2.plist here (drag-drop from finder into this window) com.googlecode.mactlmgr.tlu.plist
- Attach a debug log, if possible. Instructions at https://iterm2.com/debuglog
- Are you reporting a performance issue or a hang? Please attach a sample. Instructions at https://gitlab.com/gnachman/iterm2/wikis/HowToSample
- Are you reporting a crash? Please attach the crash log. Instructions at https://gitlab.com/gnachman/iterm2/wikis/crash-logs
Detailed steps to reproduce the problem:
- Define a two line prompt in your
.bashrc
with colors like, for instance:export PS1="\e[34m---\n- \e[0m"
- Open a new iTerm2 to load the new prompt
- Without doing anything, the two line prompt is correctly display with the correct colors
- Resize the window and then
What happened: The second line prompt color is systematically reset, as shown here:
What should have happened:
The second line prompt color must stay the same, as defined in the .bashrc
file.