Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 733 Bytes

make-a-custom-shell-prompt.md

File metadata and controls

19 lines (13 loc) · 733 Bytes

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:

$