Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Shell tools to provide a sexy prompt

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 LICENSE
Octocat-spinner-32 README
Octocat-spinner-32 git_br
Octocat-spinner-32 git_pwd
Octocat-spinner-32 git_repo
README
Tools to provide git repo recognition to bash for prompts, for example:

export PS1="\u\$(git_br):\$(git_pwd)\$ "

gives a prompt like:

reinh(master):git_ps_tools$

although I like pretty colors:

export PS1="\[\033[01;32m\]\u\[\033[00m\]\[\033[01;31m\]\$(git_br)\[\033[01;32m\]\[\033[00m\]:\[\033[01;36m\]\$(git_pwd)\[\033[00m\]\$ "

== Examples:

reinhenrichs(master):rubinius$ cd kernel
reinhenrichs(master):rubinius/kernel$ cd common
reinhenrichs(master):rubinius/kernel/common$ cd ..
reinhenrichs(master):rubinius/kernel$ git checkout HEAD^
reinhenrichs(master~1):rubinius/kernel$ 
reinhenrichs(master~1):rubinius/kernel$ git checkout master
reinhenrichs(master):rubinius/kernel$ cd ..
reinhenrichs(master):rubinius$ cd ..
reinhenrichs:/Users/reinhenrichs/code/opensource$ 
Something went wrong with that request. Please try again.