Hello Shawn, hello git list members,
Wouldn't it improve the readability of the bash prompt, if there would be a space between the branch name and the status flags (dirty, stash, untracked)?
Signed-off-by: Roman Fietze <roman.fietze@telemotive.de> --- contrib/completion/git-completion.bash | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
Show changes to contrib/completion/git-completion.bash +4 −2
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git- completion.bash index bd66639..407176b 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -169,10 +169,12 @@ __git_ps1 () fi fi + local f="$w$i$s$u$r" + f=${f:+ $f} if [ -n "${1-}" ]; then - printf "$1" "$c${b##refs/heads/}$w$i$s$u$r" + printf "$1" "$c${b##refs/heads/}$f" else - printf " (%s)" "$c${b##refs/heads/}$w$i$s$u$r" + printf " (%s)" "$c${b##refs/heads/}$f" fi fi }
-- 1.6.4.2 Roman -- Roman Fietze Telemotive AG Büro Mühlhausen Breitwiesen 73347 Mühlhausen Tel.: +49(0)7335/18493-45 http://www.telemotive.de