[PATCH v4 3/4] completion: fix branch.autosetup(merge|rebase)
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Jan 5, 2014, 10:18 UTC
- Message-ID
- <1388917085-18701-4-git-send-email-artagnon@gmail.com>
- In-Reply-To
- <1388917085-18701-1-git-send-email-artagnon@gmail.com>
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> --- contrib/completion/git-completion.bash | 1 + 1 file changed, 1 insertion(+)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 20febff..a57bcbe 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -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.*.*)
-- 1.8.5.2.227.g53f3478