Switch to using my git-aware-prompt project for bash

This commit is contained in:
2013-03-21 18:10:09 +00:00
parent d4f8b753b9
commit ee479aab4c
6 changed files with 15 additions and 66 deletions

View File

@@ -2,11 +2,13 @@
# Bash Prompt
#
PROMPT_COMMAND="find_git_branch; $PROMPT_COMMAND"
# Git enabled prompt
export PS1="\[$txtrst\]\u@\h \w\[$txtcyn\]\$git_branch\[$txtrst\]\$ "
export SUDO_PS1="\[$txtrst\]\[$bakred\]\u@\h\[$txtrst\] \w\$ "
# Customize prompt to act like pre-leopard
# PS1='\h:\w \u$ '
# Setup and use git-aware-prompt
if [ -f "$DOTBASH/git-aware-prompt/main.sh" ]; then
GITAWAREPROMPT="$DOTBASH/git-aware-prompt"
source "$GITAWAREPROMPT/main.sh"
export PS1="\u@\h \w\[$txtcyn\]\$git_branch\[$txtylw\]\$git_dirty\[$txtrst\]\$ "
export SUDO_PS1="\[$bakred\]\u@\h\[$txtrst\] \w\$ "
else
# Customize prompt to act like pre-leopard
PS1='\h:\w \u$ '
fi