I setup a custom bash prompt on one of my servers. When I log into the server via putty and the window is at the default size (not maximized), the prompt is messed up. The cursor is also in the middle of the prompt. As soon as I maximize the window, the prompt is fine.
My prompt is:
It is supposed to look like:
[Wed Oct 10 11:41][root:~]#
But when it is messed up, it looks like:
~]#d Oct 10 11:47][root:~
The cursor starts on the 'd' right after the '#'. I've tried a few things such as removing '$MyDateTime' from PS1 and typing it out manually. Also removed the '\n\r'. No change in results. Also please note that the window width is over three times the length of the prompt, so I wouldn't think it is getting too close. Maybe the prompt is too long anyway? Any ideas?