In my terminal, when I'm typing over the end of a line, rather than start a new line, my new characters overwrite the beginning of the same line.
I have seen many StackOverflow questions on this topic, but none of them have helped me. Most have something to do with improperly bracketed colors, but as far as I can tell, my PS1 looks fine.
Here it is below, generated using bash -x:
PS1='\[\033[01;32m\]\w \[\033[1;36m\]☔︎ \[\033[00m\] '
Yes, that is in fact an umbrella with rain; I have my Bash prompt update with the weather using a script I wrote.
EDIT: My BashWeather script actually can put any one of a few weather characters, so it would be great if we could solve for all of these, or come up with some other solution:
☂☃☽☀︎☔︎
If the umbrella with rain is particularly problematic, I can change that to the regular umbrella without issue.
bashbeing confused about how long your prompt is: the umbrella takes the space of one character, but is represented by a 5-byte sequence in UTF-8. – chepner Apr 7 '14 at 20:40bashand Unicode characters whose UTF-8 encodings are longer than 4 bytes. See my answer below. – chepner Apr 7 '14 at 21:17$'\u2614'). If it looks ok, then you can do the same with the other symbols. – rici Apr 9 '14 at 3:45