From 07e652054dec6e0542dfeaa56dc2fa9cdf97b0f2 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Mon, 3 Oct 2011 14:30:52 -0400 Subject: [PATCH] add "cdshowgitstatus" prompt command alias to run "git status" automatically when cd'ing to a git project --- bash_aliases | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bash_aliases b/bash_aliases index dc7c25c..b0cbdec 100755 --- a/bash_aliases +++ b/bash_aliases @@ -21,6 +21,8 @@ alias cribbage='cribbage -r' alias backgammon='backgammon -r -pb' # put 'cattodo' in $PROMPT_COMMAND to use alias cattodo='if [[ $CATTODO_LAST_WD != $PWD ]]; then if [[ -r .todo ]]; then cat .todo; fi; CATTODO_LAST_WD=$PWD; fi' +alias cdshowgitstatus='if [[ $CDSHOWGITSTATUS_LAST_WD != $PWD ]]; then if [[ -d .git ]]; then git status; fi; CDSHOWGITSTATUS_LAST_WD=$PWD; fi' +#PROMPT_COMMAND="$PROMPT_COMMAND;cdshowgitstatus" alias ls='ls --color=auto' alias strip-cr="sed -e 's/\x0d//'" alias rip='abcde -x -p -o mp3:"-v -b160"'