Skip to content

Instantly share code, notes, and snippets.

View jeremypruitt's full-sized avatar
:octocat:
@ Waabi.ai

Jeremy Pruitt jeremypruitt

:octocat:
@ Waabi.ai
View GitHub Profile
# Create a flexible, responsive prompt.
# Based on the Responsive Prompt
# http://jondavidjohn.com/blog/2012/12/how-to-accomplish-a-responsive-bash-prompt
working_directory() {
dir=`pwd`
in_home=0
if [[ `pwd` =~ ^$HOME($|\/) ]]; then
dir="~${dir#$HOME}"