diff --git a/bash/.bashrc b/bash/.bashrc index 2a1444e..2407bf6 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -61,7 +61,7 @@ if [ -n "$force_color_prompt" ]; then fi fi -source ~/.git-prompt +. ~/.git-prompt # ANSI color codes RS="\[\033[0m\]" # reset @@ -88,14 +88,13 @@ BWHT="\[\033[47m\]" # background white if [ "$color_prompt" = yes ]; then #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' #PS1="\[\033[01;37m\]\$? \$(if [[ \$? == 0 ]]; then echo \"\[\033[01;32m\]\342\234\223\"; else echo \"\[\033[01;31m\]\342\234\227\"; fi) $(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]\h'; else echo '\[\033[01;32m\]\u@\h'; fi)\[\033[01;34m\] \w \$\[\033[00m\] " + PS1FRONT="$HC$FMAG[ $FGRN${debian_chroot:+($debian_chroot)}\u$FYEL@$FGRN\h$FYEL: $FBLE\w" PS1BACK=" $FMAG]$FYEL\\$ $RS" - - #PS1=$PS1FRONT$PS1BACK + #PS1="$PS1FRONT\$(__git_ps1_new)$PS1BACK" # git in bash - PROMPT_COMMAND='__git_ps1 "'$PS1FRONT'" "'$PS1BACK'";' - unset PS1FRONT PS1BACK + PROMPT_COMMAND='__git_ps1_new "'$PS1FRONT'" "'$PS1BACK'";' else PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' PS2="> " diff --git a/bash/.git-prompt b/bash/.git-prompt index 63d1c47..06cbd9c 100644 --- a/bash/.git-prompt +++ b/bash/.git-prompt @@ -125,7 +125,7 @@ # `git-rev-list` # git | _Default_. Always compares `HEAD` to `@{upstream}` # svn | Always compares `HEAD` to `SVN` upstream -__git_ps1 () +__git_ps1_new () { if [ "$(git config --bool bash.enableGitStatus)" == "false" ]; then return; fi