From 2b43af401c21ce50815cb1ad3400f6c2bd860b4b Mon Sep 17 00:00:00 2001 From: Jon Ringle Date: Wed, 3 Oct 2012 14:48:05 -0400 Subject: [PATCH] color_who_where: add extra \ escape if $id has \ likewise-open user id's contain a backslash: domain\user The backslash needs to be escaped when colorized Signed-off-by: Jon Ringle --- git-prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-prompt.sh b/git-prompt.sh index f99a1d0..58d9d84 100755 --- a/git-prompt.sh +++ b/git-prompt.sh @@ -329,7 +329,7 @@ set_shell_label() { if [[ -n $id || -n $host ]] ; then [[ -n $id && -n $host ]] && at='@' || at='' - color_who_where="${id}${host:+$host_color$at$host}${tty:+ $tty}" + color_who_where="${id//\\/\\\\}${host:+$host_color$at$host}${tty:+ $tty}" plain_who_where="${id}$at$host" # add trailing " "