completion: keep other config var completion in camelCase

The last patch makes "git config <tab>" shows camelCase names because
that's what's in the source: config.txt. There are still a couple
manual var completion in this code. Let's make them follow the naming
convention as well.

In theory we could automate this part too because we have the
information. But let's stick to one step at a time and leave this for
later.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2018-05-26 15:55:29 +02:00
committed by Junio C Hamano
parent e17ca92637
commit f45db831c1

View File

@ -2093,20 +2093,20 @@ _git_config ()
;; ;;
branch.*.*) branch.*.*)
local pfx="${cur%.*}." cur_="${cur##*.}" local pfx="${cur%.*}." cur_="${cur##*.}"
__gitcomp "remote pushremote merge mergeoptions rebase" "$pfx" "$cur_" __gitcomp "remote pushRemote merge mergeOptions rebase" "$pfx" "$cur_"
return return
;; ;;
branch.*) branch.*)
local pfx="${cur%.*}." cur_="${cur#*.}" local pfx="${cur%.*}." cur_="${cur#*.}"
__gitcomp_direct "$(__git_heads "$pfx" "$cur_" ".")" __gitcomp_direct "$(__git_heads "$pfx" "$cur_" ".")"
__gitcomp_nl_append $'autosetupmerge\nautosetuprebase\n' "$pfx" "$cur_" __gitcomp_nl_append $'autoSetupMerge\nautoSetupRebase\n' "$pfx" "$cur_"
return return
;; ;;
guitool.*.*) guitool.*.*)
local pfx="${cur%.*}." cur_="${cur##*.}" local pfx="${cur%.*}." cur_="${cur##*.}"
__gitcomp " __gitcomp "
argprompt cmd confirm needsfile noconsole norescan argPrompt cmd confirm needsFile noConsole noRescan
prompt revprompt revunmerged title prompt revPrompt revUnmerged title
" "$pfx" "$cur_" " "$pfx" "$cur_"
return return
;; ;;
@ -2135,14 +2135,14 @@ _git_config ()
local pfx="${cur%.*}." cur_="${cur##*.}" local pfx="${cur%.*}." cur_="${cur##*.}"
__gitcomp " __gitcomp "
url proxy fetch push mirror skipDefaultUpdate url proxy fetch push mirror skipDefaultUpdate
receivepack uploadpack tagopt pushurl receivepack uploadpack tagOpt pushurl
" "$pfx" "$cur_" " "$pfx" "$cur_"
return return
;; ;;
remote.*) remote.*)
local pfx="${cur%.*}." cur_="${cur#*.}" local pfx="${cur%.*}." cur_="${cur#*.}"
__gitcomp_nl "$(__git_remotes)" "$pfx" "$cur_" "." __gitcomp_nl "$(__git_remotes)" "$pfx" "$cur_" "."
__gitcomp_nl_append "pushdefault" "$pfx" "$cur_" __gitcomp_nl_append "pushDefault" "$pfx" "$cur_"
return return
;; ;;
url.*.*) url.*.*)