An open API service indexing awesome lists of open source software.

https://github.com/kyleburton/krb-bash-utils

My Bash utilities and profile settings (including git status in the prompt)
https://github.com/kyleburton/krb-bash-utils

Last synced: 5 months ago
JSON representation

My Bash utilities and profile settings (including git status in the prompt)

Awesome Lists containing this project

README

          

Bash functions and customizations that I've found useful and need everywhere I
do work in the shell.

Git Status in the Bash Prompt
========================================

This is based off of the example from gitready.com:

http://henrik.nyh.se/2008/12/git-dirty-prompt

I keep my $HOME directories checked in to their own Git repository, with a
branch named `home'. I've added a check to the above so the prompt shows not
just which branch, but a `[---]' when I'm in a directory not tracked by the
current git repository.

Eg, in a clean $HOME:

kburton@kburton-lin ~[home]$

in a dirty $HOME:

kburton@kburton-lin ~[home*]$

in my ~/tmp directory (untracked):

kburton@kburton-lin ~/tmp[---]$

in a clean sub (git) project directory (branch is master):

kburton@kburton-lin ~/projects/krb-bash-utils[master]$