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 <spearce@spearce.org>
This commit is contained in:
Shawn O. Pearce
2007-05-24 02:07:45 -04:00
parent 8f87fae645
commit 12977705b3

View File

@ -764,9 +764,11 @@ _git_config ()
case "$cur" in case "$cur" in
--*) --*)
__gitcomp " __gitcomp "
--global --list --replace-all --global --system
--list --replace-all
--get --get-all --get-regexp --get --get-all --get-regexp
--add --unset --unset-all --add --unset --unset-all
--remove-section --rename-section
" "
return return
;; ;;
@ -785,7 +787,10 @@ _git_config ()
remote.*.*) remote.*.*)
local pfx="${cur%.*}." local pfx="${cur%.*}."
cur="${cur##*.}" cur="${cur##*.}"
__gitcomp "url fetch push" "$pfx" "$cur" __gitcomp "
url fetch push skipDefaultUpdate
receivepack uploadpack tagopt
" "$pfx" "$cur"
return return
;; ;;
remote.*) remote.*)
@ -835,6 +840,9 @@ _git_config ()
format.headers format.headers
gitcvs.enabled gitcvs.enabled
gitcvs.logfile gitcvs.logfile
gitcvs.allbinary
gitcvs.dbname gitcvs.dbdriver gitcvs.dbuser gitcvs.dvpass
gc.packrefs
gc.reflogexpire gc.reflogexpire
gc.reflogexpireunreachable gc.reflogexpireunreachable
gc.rerereresolved gc.rerereresolved
@ -851,9 +859,11 @@ _git_config ()
i18n.commitEncoding i18n.commitEncoding
i18n.logOutputEncoding i18n.logOutputEncoding
log.showroot log.showroot
merge.tool
merge.summary merge.summary
merge.verbosity merge.verbosity
pack.window pack.window
pack.depth
pull.octopus pull.octopus
pull.twohead pull.twohead
repack.useDeltaBaseOffset repack.useDeltaBaseOffset