diff options
| author | EuAndreh <eu@euandre.org> | 2018-04-01 23:38:40 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2018-04-01 23:43:05 -0300 |
| commit | ca24a0389ee061ab38dafa24567fb53b3c2a9ae8 (patch) | |
| tree | 21df64c76a73e054ec7f06e920fb13b74c4529f4 | |
| parent | Add re-jump.el configuration (diff) | |
| download | dotfiles-ca24a0389ee061ab38dafa24567fb53b3c2a9ae8.tar.gz dotfiles-ca24a0389ee061ab38dafa24567fb53b3c2a9ae8.tar.xz | |
Use custom blue PS1 status
| -rw-r--r-- | bash/colors.sh | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/bash/colors.sh b/bash/colors.sh index 6266c10d..13e98e1e 100644 --- a/bash/colors.sh +++ b/bash/colors.sh @@ -97,14 +97,12 @@ export PS1='$(if [ $? != 0 ]; then \ fi)'$IBlack$Time12h$Color_Off' '$BYellow$PathShort/$Color_Off'\ $(git branch &>/dev/null;\ if [ $? -eq 0 ]; then \ - echo "$(echo `git status` | grep "Changes" > /dev/null 2>&1; \ - if [ "$?" != "0" ]; then \ - # @4 - Clean repository - nothing to commit - echo "'$Green'"$(__git_ps1 " (%s)")"'$Color_Off'"; \ - else \ - # @5 - Changes to working tree - echo "'$IRed'"$(__git_ps1 " {%s}")"'$Color_Off'"; \ - fi)" - $(echo "'$IBlack'"`git sha7`"'$Color_Off'"); \ + echo "$(\ + echo `git status` | grep "Changes" > /dev/null 2>&1 && echo "'$IRed'"$(__git_ps1 " {%s}")"'$Color_Off'"; \ + echo `git status` | grep -v "Changes" | grep -E "to publish your local commits" > /dev/null 2>&1 && echo "'$IBlue'"$(__git_ps1 " [%s ^^^]")"'$Color_Off'"; \ + echo `git status` | grep -v "Changes" | grep -E "to update your local branch" > /dev/null 2>&1 && echo "'$IBlue'"$(__git_ps1 " [%s vvv]")"'$Color_Off'"; \ + echo `git status` | grep -v "Changes" | grep -E -v "to publish|update your local branch" > /dev/null 2>&1 && echo "'$Green'"$(__git_ps1 " (%s)")"'$Color_Off'"; \ + )" - $(echo "'$IBlack'"`git sha7`"'$Color_Off'"); \ fi)$(if [[ $IN_NIX_SHELL == 1 ]]; then\ echo "\n'$IBlack'~>'$Color_Off' '$Purple'nix-shell'$Color_Off' ('$BIBlue'$name'$Color_Off')'$Color_Off'" ;\ fi)$(echo "\n'$BIPurple'\$'$Color_Off' ";)' |
