diff options
Diffstat (limited to 'bash')
-rw-r--r-- | bash/bashrc.d/prompt.bash | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash index 67efbd70..e34d1f2a 100644 --- a/bash/bashrc.d/prompt.bash +++ b/bash/bashrc.d/prompt.bash @@ -33,9 +33,10 @@ function prompt { && return 1 $(git rev-parse --is-inside-work-tree 2>/dev/null ) \ || return 1 - branch=$(git symbolic-ref --quiet --short HEAD 2> /dev/null ) \ + branch=$(git symbolic-ref --quiet HEAD 2>/dev/null ) \ || branch=$(git rev-parse --short HEAD 2>/dev/null ) \ - || branch="(unknown)" + || branch='unknown' + branch=${branch##*/} $(git diff --quiet --ignore-submodules --cached ) \ || state=${state}+ $(git diff-files --quiet --ignore-submodules -- ) \ |