Nice Prompt

Bash, Developing, Git, Virtualenv

Nice Prompt

A simple to use, fully functional (includes date, time, user, host, cwd, git status, and virtual env), .bash_profile for your bash prompt.

GitHub Source

Be Nice.

Overview

The developer terminal is one of the most important and powerful tools a developer interacts with on a regular basis.  I found that I was constantly struggling to customize my terminal prompt to suit my needs and give me the information I needed.  The most common way to get a better prompt is to crawl the web looking at various other peoples examples and then copying and pasting that.  Half the time they don’t work, the other half they are too convoluted to manipulate to my exact needs.

For these reasons, and wanting to better understand bash, I decided to write a simple bash profile that was easily updateable to change the information and its positioning in my prompt.  It may not get used by anyone else but I have reused my Nice Prompt bash on every machine I’ve worked with over the last 4 years and I can no longer imagine working without it.

The best features are a color coded square around the git branch telling me the current status of my git repo, the current time and working directory, and the name of the current python virtualenv.  There are many other features built into this profile (like easy compression and extraction aliases) but there is no need to list them all here.  Jump over to the source and see if you find it useful.

GitHub Source