A Prompt in Your Colors
The prompt is the text in a variable, PS1, so you choose what it shows with codes such as \W for the folder and \A for the time, color it with \[\e[…m\] codes, show the Git branch with __git_ps1, and keep it in ~/.bashrc.
Updated
![Cheat sheet for the lesson A Prompt in Your Colors: The prompt is the text in a variable, PS1, so you choose what it shows with codes such as \W for the folder and \A for the time, color it with \[\e[…m\] codes, show the Git branch with __git_ps1, and keep it in ~/.bashrc.](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/7f9f2c7dcf70452a808c5ad30f93cce3.webp)
- Category
- Bash
- Level
- Journeyman
- Tags
- ansi-escape-code, command-prompt, current-branch, linux, ps1, unix