Code

completion: Allow dash as the first character for __git_ps1
[git.git] / contrib / completion / git-completion.bash
index 1496c6dc05822d3009aaf7d88cc5a66dfca9ea23..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
 }
 
@@ -1152,7 +1152,7 @@ _git_branch ()
                __gitcomp "
                        --color --no-color --verbose --abbrev= --no-abbrev
                        --track --no-track --contains --merged --no-merged
-                       --set-upstream
+                       --set-upstream --edit-description --list
                        "
                ;;
        *)
@@ -1622,7 +1622,7 @@ _git_log ()
 
 __git_merge_options="
        --no-commit --no-stat --log --no-log --squash --strategy
-       --commit --stat --no-squash --ff --no-ff --ff-only
+       --commit --stat --no-squash --ff --no-ff --ff-only --edit --no-edit
 "
 
 _git_merge ()