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.
Category
Bash
Level
Journeyman
Tags
ansi-escape-code, command-prompt, current-branch, linux, ps1, unix