Skip to content

Commit 1297770

Browse files
committed
Update bash completion for git-config options
A few new configuration options grew out of the woodwork during the 1.5.2 series. Most of these are pretty easy to support a completion of, so we do so. I wanted to also add completion support for the <driver> part of merge.<driver>.name but to do that we have to look at all of the .gitattributes files and guess what the unique set of <driver> strings would be. Since this appears to be non-trivial I'm punting on it at this time. Signed-off-by: Shawn O. Pearce <[email protected]>
1 parent 8f87fae commit 1297770

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

contrib/completion/git-completion.bash

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -764,9 +764,11 @@ _git_config ()
764764
case "$cur" in
765765
--*)
766766
__gitcomp "
767-
--global --list --replace-all
767+
--global --system
768+
--list --replace-all
768769
--get --get-all --get-regexp
769770
--add --unset --unset-all
771+
--remove-section --rename-section
770772
"
771773
return
772774
;;
@@ -785,7 +787,10 @@ _git_config ()
785787
remote.*.*)
786788
local pfx="${cur%.*}."
787789
cur="${cur##*.}"
788-
__gitcomp "url fetch push" "$pfx" "$cur"
790+
__gitcomp "
791+
url fetch push skipDefaultUpdate
792+
receivepack uploadpack tagopt
793+
" "$pfx" "$cur"
789794
return
790795
;;
791796
remote.*)
@@ -835,6 +840,9 @@ _git_config ()
835840
format.headers
836841
gitcvs.enabled
837842
gitcvs.logfile
843+
gitcvs.allbinary
844+
gitcvs.dbname gitcvs.dbdriver gitcvs.dbuser gitcvs.dvpass
845+
gc.packrefs
838846
gc.reflogexpire
839847
gc.reflogexpireunreachable
840848
gc.rerereresolved
@@ -851,9 +859,11 @@ _git_config ()
851859
i18n.commitEncoding
852860
i18n.logOutputEncoding
853861
log.showroot
862+
merge.tool
854863
merge.summary
855864
merge.verbosity
856865
pack.window
866+
pack.depth
857867
pull.octopus
858868
pull.twohead
859869
repack.useDeltaBaseOffset

0 commit comments

Comments
 (0)