Update bash completion with new 1.5.3 command line options
A number of commands have learned new tricks as part of git 1.5.3. If these are long options (--foo) we tend to support them in the bash completion, as it makes the user's task of using the option slightly easier. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed
Aug 23, 2007 at 01:39 UTC
47e98eecf3721dca64e3d453fc96e3a02debe54f
1 file changed
+26
-6
contrib/completion/git-completion.bash
+26
-6
@@ -419,7 +419,7 @@ _git_add ()
419
local cur="${COMP_WORDS[COMP_CWORD]}"
420
case "$cur" in
421
--*)
422
- __gitcomp "--interactive"
422
+ __gitcomp "--interactive --refresh"
423
return
424
esac
425
COMPREPLY=()
@@ -573,6 +573,7 @@ _git_format_patch ()
573
--stdout --attach --thread
574
--output-directory
575
--numbered --start-number
576
+ --numbered-files
577
--keep-subject
578
--signoff
579
--in-reply-to=
@@ -590,7 +591,7 @@ _git_gc ()
591
local cur="${COMP_WORDS[COMP_CWORD]}"
592
case "$cur" in
593
--*)
593
- __gitcomp "--prune"
594
+ __gitcomp "--prune --aggressive"
595
return
596
;;
597
esac
@@ -617,14 +618,20 @@ _git_log ()
618
" "" "${cur##--pretty=}"
619
return
620
;;
621
+ --date=*)
622
+ __gitcomp "
623
+ relative iso8601 rfc2822 short local default
624
+ " "" "${cur##--date=}"
625
+ return
626
+ ;;
627
--*)
628
__gitcomp "
629
--max-count= --max-age= --since= --after=
630
--min-age= --before= --until=
631
--root --topo-order --date-order --reverse
625
- --no-merges
632
+ --no-merges --follow
633
--abbrev-commit --abbrev=
627
- --relative-date
634
+ --relative-date --date=
635
--author= --committer= --grep=
636
--all-match
637
--pretty= --name-status --name-only --raw
@@ -796,7 +803,7 @@ _git_config ()
803
case "$cur" in
804
--*)
805
__gitcomp "
799
- --global --system
806
+ --global --system --file=
807
--list --replace-all
808
--get --get-all --get-regexp
809
--add --unset --unset-all
@@ -839,6 +846,7 @@ _git_config ()
846
core.ignoreStat
847
core.preferSymlinkRefs
848
core.logAllRefUpdates
849
+ core.loosecompression
850
core.repositoryFormatVersion
851
core.sharedRepository
852
core.warnAmbiguousRefs
@@ -870,6 +878,7 @@ _git_config ()
878
diff.renames
879
fetch.unpackLimit
880
format.headers
881
+ format.subjectprefix
882
gitcvs.enabled
883
gitcvs.logfile
884
gitcvs.allbinary
@@ -896,6 +905,10 @@ _git_config ()
905
merge.verbosity
906
pack.window
907
pack.depth
908
+ pack.windowMemory
909
+ pack.compression
910
+ pack.deltaCacheSize
911
+ pack.deltaCacheLimit
912
pull.octopus
913
pull.twohead
914
repack.useDeltaBaseOffset
@@ -1024,7 +1037,14 @@ _git ()
1037
if [ $c -eq $COMP_CWORD -a -z "$command" ]; then
1038
case "${COMP_WORDS[COMP_CWORD]}" in
1039
--*=*) COMPREPLY=() ;;
1027
- --*) __gitcomp "--git-dir= --bare --version --exec-path" ;;
1040
+ --*) __gitcomp "
1041
+ --no-pager
1042
+ --git-dir=
1043
+ --bare
1044
+ --version
1045
+ --exec-path
1046
+ "
1047
+ ;;
1048
*) __gitcomp "$(__git_commands) $(__git_aliases)" ;;
1049
esac
1050
return