completion: fix branch.autosetup(merge|rebase)
authorRamkumar Ramachandra <artagnon@gmail.com>
Sun, 5 Jan 2014 10:18:04 +0000 (15:48 +0530)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Jan 2014 17:17:05 +0000 (09:17 -0800)
When attempting to complete

$ git config branch.auto<TAB>

'autosetupmerge' and 'autosetuprebase' don't come up. This is because
"$cur" is matched with "branch.*" and a list of branches are
completed. Add 'autosetupmerge', 'autosetuprebase' as candidates for
completion too, using __gitcomp_nl_append ().

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash
index 20febffd9db785c98fda9202a5342cf261e7c7b6..a57bcbe40355f0fe33bc7ea62507d59005a7e5af 100644 (file)
@@ -1841,6 +1841,7 @@ _git_config ()
        branch.*)
                local pfx="${cur%.*}." cur_="${cur#*.}"
                __gitcomp_nl "$(__git_heads)" "$pfx" "$cur_" "."
+               __gitcomp_nl_append $'autosetupmerge\nautosetuprebase\n' "$pfx" "$cur_"
                return
                ;;
        guitool.*.*)