bash_aliases: prepend to $PROMPT_COMMAND instead of appending

This commit is contained in:
Josh Holtrop 2011-11-08 14:59:53 -05:00
parent dba4eb1c2f
commit 714d672fdb

View File

@ -22,7 +22,7 @@ alias backgammon='backgammon -r -pb'
# put 'cattodo' in $PROMPT_COMMAND to use # 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 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' 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" #PROMPT_COMMAND="cdshowgitstatus;$PROMPT_COMMAND"
function prompt_ps1_git_branch() function prompt_ps1_git_branch()
{ {
if [[ -e /usr/bin/git && "$PCGB_LAST_WD" != "$PWD" ]]; then if [[ -e /usr/bin/git && "$PCGB_LAST_WD" != "$PWD" ]]; then