Bash Context-Dependent Color Prompt

Perm URL with updates:

Want your bash prompt be colored and context dependent? like, showing you which git branch you are in?

bash color prompt
Bash context-dependent color prompt

Bash provided a PROMPT_COMMAND hook, that lets you call {shell, perl, python, ruby, …} script to specify your prompt. So, your prompt can show all sort of info and color.

Geologist and Googler Kurt Schwehr shows you how.

Popular posts from this blog

Browser User Agent Strings 2012

11 Years of Writing About Emacs

does md5 creates more randomness?