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 " "