Code

completion: Allow dash as the first character for __git_ps1
[git.git] / contrib / completion / git-completion.bash
index 91c7acbbb48516e34d2bfc34617e2efd75aaf2b1..61ff1521b625111a839941325a232c73ac01cda2 100755 (executable)
@@ -313,7 +313,7 @@ __git_ps1 ()
                fi
 
                local f="$w$i$s$u"
-               printf "${1:- (%s)}" "$c${b##refs/heads/}${f:+ $f}$r$p"
+               printf -- "${1:- (%s)}" "$c${b##refs/heads/}${f:+ $f}$r$p"
        fi
 }