diff options
author | Erich Eckner <git@eckner.net> | 2016-10-06 15:14:13 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-10-06 15:14:13 +0200 |
commit | f50ae81ded9b58c881e8e18ad6c0a7194d34c35b (patch) | |
tree | daeefe5aa12a1321293fe291038306a8bc6ce20b /bash-git-prompt.in | |
parent | 5f28e588e2963a3ce58d6bae605907fda820ccff (diff) | |
download | bash-git-prompt-f50ae81ded9b58c881e8e18ad6c0a7194d34c35b.tar.xz |
Leerzeichen nur bei nichtleerem Start einfügen
Diffstat (limited to 'bash-git-prompt.in')
-rwxr-xr-x | bash-git-prompt.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bash-git-prompt.in b/bash-git-prompt.in index 0c06894..16daab7 100755 --- a/bash-git-prompt.in +++ b/bash-git-prompt.in @@ -22,7 +22,7 @@ fi if ! ${skip} && status=$(git status --porcelain 2> /dev/null) then - PS1="$PS1 " + [ -n "${PS1}" ] && PS1="$PS1 " branch="$((git symbolic-ref HEAD 2> /dev/null || git describe --always) | sed "s|^.*/||")" gitDir="$(git rev-parse --show-toplevel)/$(git rev-parse --git-dir)" if [ -e ${gitDir}/rebase-merge ] || [ -e ${gitDir}/rebase-apply ] |