TIL: Make a Short Bash Prompt
Ok, so I use VS Code with an integrated terminal on the right. My terminal is really narrow, so I run out of room quickly. My bash prompt can overflow the narrow screen, so I decided to change it.
Following this article about changing the bash prompt, I set the PS1 variable to this:
PS1="\033[0;31m$ \e[0m"
The \e033[0;31m ANSI escape sequence stands for red, and the \e\0m sequence resets the color, leaving my prompt as a super-short:
$