My BASH Prompt

I’ve just spent some time customising my BASH prompt. In fact I wrote a 111 line BASH script to set it up. And I suspect it’s going to get longer :P .

For now it’s got:
Username, highlighted red when you’re root (e.g. sudo -s)
Hostname, highlighted red when (the prompt thinks that) you’re sshed into a remote machine
The Path of the CWD (of course)
Some Git information (when in a Git repo), the current branch, current HEAD’s SHA (abbreviated), and whether there are any unstaged changes/untracked files, and if there are any staged changes.

I’ve put it up on github as a gist: prompt.sh

Advertisement
This entry was posted in Software and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s