mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 13:46:41 +00:00
Switch to using my git-aware-prompt project for bash
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user