I was trying to add some color and the time to my PS1 prompt on Debian 10 in my ~/.bashrc file. It initially looks right, but if I type a line that's more than about 40 characters the cursor moves to the beginning of the line (the first character of the prompt itself) and typing continues from there. I think something isn't escaped correctly, but I can't see what it is.
SH_OFF='\[\033[00m\]'
SH_BLACK='\[\033[1;30m\]'
SH_BLUE='\[\033[1;34m\]'
SH_GREEN='\[\033[1;32m\]'
SH_CYAN='\[\033[1;36m\]'
SH_RED='\[\033[1;31m\]'
SH_PURPLE='\[\033[1;35m\]'
SH_BROWN='\[\033[1;33m\]'
SH_YELLOW='\[\033[1;33m\]'
PS1="${debian_chroot:+($debian_chroot)}$SH_GREEN\u@\h \t$SH_OFF $SH_YELLOW\w$SH_OFF \$ "