On my mac and Ubuntu I have my PS1 values set to the below:export PS1='\[\e[1;31m\]\d\[\e[0m\] \[\e[1;32m\]\u  \W\[\e[0m\] \[\e[1;36m\]>\[\e[0,\] \[$(tput sgr0)\]'On Ubuntu the terminal prompt looks fine. But on my Mac an extra B is placed, like below:Mon Jan 16 DrizzutoJr  ~ >BI am assuming Mac and Ubuntu handle the value slightly differently. Can someone explain what's going on and how to fix it?
Strange behavior of Terminal PS1 value in Mac vs. Ubuntu
ubuntu;terminal;osx
That \[\e[0,\] is suspect, since the enclosed text escape, does not correspond to a valid ANSI escape sequence (the comma is not a valid final byte).  It may happen to work with VTE (which has a lot of interesting cut/paste in its innards), but on other terminals, you're likely to get a stray character which will show up.Perhaps you intended an adjacent key on the keyboard, m.By the way, $(tput sgr0) is likely to produce the equivalent of \e[0m as well (using tput consistently throughout the expression would work as well, and though more verbose, perhaps more readable).Further reading:Is there any objective benefit to escape sequences over tput?