# 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.

![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
- Updated: November 10, 2026

Source: https://www.ask-codey.com/cheat-sheets/bash-custom-prompt-cheat-sheet
