Skip to content

Instantly share code, notes, and snippets.

Customizing your shell prompt
Shell prompts are extremely customizable. You can customize them in two ways: (1) by using command characters that print out special things and (2) by using colors. Also, customizing the prompt is different in different shells; I'm going to cover tcsh and zsh here. bash is the other popular shell, but I think it sucks, and I never use it, so I'm not going to waste any time on it.
tcsh
zsh
tcsh
I'll start with tcsh, since it's the default BSD and Mac OS X shell. Here's a very simple prompt: