2 # bash completion support for core Git.
4 # Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
5 # Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
6 # Distributed under the GNU General Public License, version 2.0.
8 # The contained completion routines provide support for completing:
10 # *) local and remote branch names
11 # *) local and remote tag names
12 # *) .git/remotes file names
13 # *) git 'subcommands'
14 # *) tree paths within 'ref:path/to/file' expressions
15 # *) common --long-options
17 # To use these routines:
19 # 1) Copy this file to somewhere (e.g. ~/.git-completion.sh).
20 # 2) Added the following line to your .bashrc:
21 # source ~/.git-completion.sh
23 # 3) You may want to make sure the git executable is available
24 # in your PATH before this script is sourced, as some caching
25 # is performed while the script loads. If git isn't found
26 # at source time then all lookups will be done on demand,
27 # which may be slightly slower.
29 # 4) Consider changing your PS1 to also show the current branch:
30 # PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
32 # The argument to __git_ps1 will be displayed only if you
33 # are currently in a git repository. The %s token will be
34 # the name of the current branch.
38 # *) Read Documentation/SubmittingPatches
39 # *) Send all patches to the current maintainer:
41 # "Shawn O. Pearce" <spearce@spearce.org>
43 # *) Always CC the Git mailing list:
51 if [ -n "$__git_dir" ]; then
53 elif [ -d .git
]; then
56 git rev-parse
--git-dir 2>/dev
/null
58 elif [ -d "$1/.git" ]; then
67 local g
="$(git rev-parse --git-dir 2>/dev/null)"
71 if [ -d "$g/../.dotest" ]
73 if test -f "$g/../.dotest/rebasing"
76 elif test -f "$g/../.dotest/applying"
82 b
="$(git symbolic-ref HEAD 2>/dev/null)"
83 elif [ -f "$g/.dotest-merge/interactive" ]
86 b
="$(cat "$g/.dotest-merge
/head-name
")"
87 elif [ -d "$g/.dotest-merge" ]
90 b
="$(cat "$g/.dotest-merge
/head-name
")"
91 elif [ -f "$g/MERGE_HEAD" ]
94 b
="$(git symbolic-ref HEAD 2>/dev/null)"
96 if [ -f "$g/BISECT_LOG" ]
100 if ! b
="$(git symbolic-ref HEAD 2>/dev/null)"
102 if ! b
="$(git describe --exact-match HEAD 2>/dev/null)"
104 b
="$(cut -c1-7 "$g/HEAD
")..."
110 printf "$1" "${b##refs/heads/}$r"
112 printf " (%s)" "${b##refs/heads/}$r"
119 local all c s
=$
'\n' IFS
=' '$
'\t'$
'\n'
120 local cur
="${COMP_WORDS[COMP_CWORD]}"
121 if [ $# -gt 2 ]; then
126 --*=*) all
="$all$c$4$s" ;;
127 *.
) all
="$all$c$4$s" ;;
128 *) all
="$all$c$4 $s" ;;
132 COMPREPLY
=($
(compgen
-P "$2" -W "$all" -- "$cur"))
138 local cmd i is_hash
=y dir
="$(__gitdir "$1")"
139 if [ -d "$dir" ]; then
140 for i
in $
(git
--git-dir="$dir" \
141 for-each-ref
--format='%(refname)' \
143 echo "${i#refs/heads/}"
147 for i
in $
(git-ls-remote
"$1" 2>/dev
/null
); do
148 case "$is_hash,$i" in
151 n
,refs
/heads
/*) is_hash
=y
; echo "${i#refs/heads/}" ;;
152 n
,*) is_hash
=y
; echo "$i" ;;
159 local cmd i is_hash
=y dir
="$(__gitdir "$1")"
160 if [ -d "$dir" ]; then
161 for i
in $
(git
--git-dir="$dir" \
162 for-each-ref
--format='%(refname)' \
164 echo "${i#refs/tags/}"
168 for i
in $
(git-ls-remote
"$1" 2>/dev
/null
); do
169 case "$is_hash,$i" in
172 n
,refs
/tags
/*) is_hash
=y
; echo "${i#refs/tags/}" ;;
173 n
,*) is_hash
=y
; echo "$i" ;;
180 local cmd i is_hash
=y dir
="$(__gitdir "$1")"
181 if [ -d "$dir" ]; then
182 if [ -e "$dir/HEAD" ]; then echo HEAD
; fi
183 for i
in $
(git
--git-dir="$dir" \
184 for-each-ref
--format='%(refname)' \
185 refs
/tags refs
/heads refs
/remotes
); do
187 refs
/tags
/*) echo "${i#refs/tags/}" ;;
188 refs
/heads
/*) echo "${i#refs/heads/}" ;;
189 refs
/remotes
/*) echo "${i#refs/remotes/}" ;;
195 for i
in $
(git-ls-remote
"$dir" 2>/dev
/null
); do
196 case "$is_hash,$i" in
199 n
,refs
/tags
/*) is_hash
=y
; echo "${i#refs/tags/}" ;;
200 n
,refs
/heads
/*) is_hash
=y
; echo "${i#refs/heads/}" ;;
201 n
,refs
/remotes
/*) is_hash
=y
; echo "${i#refs/remotes/}" ;;
202 n
,*) is_hash
=y
; echo "$i" ;;
210 for i
in $
(__git_refs
"$1"); do
215 __git_refs_remotes
()
217 local cmd i is_hash
=y
218 for i
in $
(git-ls-remote
"$1" 2>/dev
/null
); do
219 case "$is_hash,$i" in
222 echo "$i:refs/remotes/$1/${i#refs/heads/}"
226 n
,refs
/tags
/*) is_hash
=y
;;
234 local i ngoff IFS
=$
'\n' d
="$(__gitdir)"
235 shopt -q nullglob || ngoff
=1
237 for i
in "$d/remotes"/*; do
238 echo ${i#$d/remotes/}
240 [ "$ngoff" ] && shopt -u nullglob
241 for i
in $
(git
--git-dir="$d" config
--list); do
251 __git_merge_strategies
()
253 if [ -n "$__git_merge_strategylist" ]; then
254 echo "$__git_merge_strategylist"
257 sed -n "/^all_strategies='/{
258 s/^all_strategies='//
262 }" "$(git --exec-path)/git-merge"
264 __git_merge_strategylist
=
265 __git_merge_strategylist
="$(__git_merge_strategies 2>/dev/null)"
267 __git_complete_file
()
269 local pfx
ls ref cur
="${COMP_WORDS[COMP_CWORD]}"
285 COMPREPLY
=($
(compgen
-P "$pfx" \
286 -W "$(git --git-dir="$
(__gitdir
)" ls-tree "$ls" \
287 | sed '/^100... blob /s,^.* ,,
296 __gitcomp
"$(__git_refs)"
301 __git_complete_revlist
()
303 local pfx cur
="${COMP_WORDS[COMP_CWORD]}"
308 __gitcomp
"$(__git_refs)" "$pfx" "$cur"
313 __gitcomp
"$(__git_refs)" "$pfx" "$cur"
319 __gitcomp
"$(__git_refs)"
326 if [ -n "$__git_commandlist" ]; then
327 echo "$__git_commandlist"
331 for i
in $
(git
help -a|
egrep '^ ')
334 *--*) : helper pattern
;;
335 applymbox
) : ask gittus
;;
336 applypatch
) : ask gittus
;;
337 archimport
) : import
;;
338 cat-file
) : plumbing
;;
339 check-attr
) : plumbing
;;
340 check-ref-format
) : plumbing
;;
341 commit-tree
) : plumbing
;;
342 cvsexportcommit
) : export;;
343 cvsimport
) : import
;;
344 cvsserver
) : daemon
;;
346 diff-files
) : plumbing
;;
347 diff-index
) : plumbing
;;
348 diff-tree
) : plumbing
;;
349 fast-import
) : import
;;
350 fsck-objects
) : plumbing
;;
351 fetch-pack
) : plumbing
;;
352 fmt-merge-msg
) : plumbing
;;
353 for-each-ref
) : plumbing
;;
354 hash-object
) : plumbing
;;
355 http-
*) : transport
;;
356 index-pack
) : plumbing
;;
357 init-db
) : deprecated
;;
358 local-fetch
) : plumbing
;;
359 mailinfo
) : plumbing
;;
360 mailsplit
) : plumbing
;;
361 merge-
*) : plumbing
;;
364 pack-objects
) : plumbing
;;
365 pack-redundant
) : plumbing
;;
366 pack-refs
) : plumbing
;;
367 parse-remote
) : plumbing
;;
368 patch-id
) : plumbing
;;
369 peek-remote
) : plumbing
;;
371 prune-packed
) : plumbing
;;
372 quiltimport
) : import
;;
373 read-tree
) : plumbing
;;
374 receive-pack
) : plumbing
;;
376 repo-config
) : deprecated
;;
378 rev-list
) : plumbing
;;
379 rev-parse
) : plumbing
;;
380 runstatus
) : plumbing
;;
381 sh-setup
) : internal
;;
383 send-pack
) : plumbing
;;
384 show-index
) : plumbing
;;
386 stripspace
) : plumbing
;;
387 svn
) : import
export;;
388 symbolic-ref
) : plumbing
;;
389 tar-tree
) : deprecated
;;
390 unpack-file
) : plumbing
;;
391 unpack-objects
) : plumbing
;;
392 update-index
) : plumbing
;;
393 update-ref
) : plumbing
;;
394 update-server-info
) : daemon
;;
395 upload-archive
) : plumbing
;;
396 upload-pack
) : plumbing
;;
397 write-tree
) : plumbing
;;
398 verify-tag
) : plumbing
;;
404 __git_commandlist
="$(__git_commands 2>/dev/null)"
409 for i
in $
(git
--git-dir="$(__gitdir)" config
--list); do
419 __git_aliased_command
()
421 local word cmdline
=$
(git
--git-dir="$(__gitdir)" \
422 config
--get "alias.$1")
423 for word
in $cmdline; do
424 if [ "${word##-*}" ]; then
431 __git_whitespacelist
="nowarn warn error error-all strip"
435 local cur
="${COMP_WORDS[COMP_CWORD]}"
436 if [ -d .dotest
]; then
437 __gitcomp
"--skip --resolved"
442 __gitcomp
"$__git_whitespacelist" "" "${cur##--whitespace=}"
447 --signoff --utf8 --binary --3way --interactive
457 local cur
="${COMP_WORDS[COMP_CWORD]}"
460 __gitcomp
"$__git_whitespacelist" "" "${cur##--whitespace=}"
465 --stat --numstat --summary --check --index
466 --cached --index-info --reverse --reject --unidiff-zero
467 --apply --no-add --exclude=
468 --whitespace= --inaccurate-eof --verbose
477 local cur
="${COMP_WORDS[COMP_CWORD]}"
480 __gitcomp
"--interactive --refresh"
489 while [ $c -lt $COMP_CWORD ]; do
492 start|bad|good|
reset|visualize|replay|log
)
500 if [ -z "$command" ]; then
501 __gitcomp
"start bad good reset visualize replay log"
507 __gitcomp
"$(__git_refs)"
517 local i c
=1 only_local_ref
="n" has_r
="n"
519 while [ $c -lt $COMP_CWORD ]; do
522 -d|
-m) only_local_ref
="y" ;;
528 case "${COMP_WORDS[COMP_CWORD]}" in
529 --*=*) COMPREPLY
=() ;;
532 --color --no-color --verbose --abbrev= --no-abbrev
537 if [ $only_local_ref = "y" -a $has_r = "n" ]; then
538 __gitcomp
"$(__git_heads)"
540 __gitcomp
"$(__git_refs)"
548 local mycword
="$COMP_CWORD"
549 case "${COMP_WORDS[0]}" in
551 local cmd
="${COMP_WORDS[2]}"
552 mycword
="$((mycword-1))"
555 local cmd
="${COMP_WORDS[1]}"
560 __gitcomp
"create list-heads verify unbundle"
568 __git_complete_revlist
577 __gitcomp
"$(__git_refs)"
582 __gitcomp
"$(__git_refs)"
587 local cur
="${COMP_WORDS[COMP_CWORD]}"
590 __gitcomp
"--edit --no-commit"
593 __gitcomp
"$(__git_refs)"
600 local cur
="${COMP_WORDS[COMP_CWORD]}"
604 --all --author= --signoff --verify --no-verify
605 --edit --amend --include --only
614 __gitcomp
"$(__git_refs)"
619 local cur
="${COMP_WORDS[COMP_CWORD]}"
622 __gitcomp
"--cached --stat --numstat --shortstat --summary
623 --patch-with-stat --name-only --name-status --color
624 --no-color --color-words --no-renames --check
625 --full-index --binary --abbrev --diff-filter
626 --find-copies-harder --pickaxe-all --pickaxe-regex
627 --text --ignore-space-at-eol --ignore-space-change
628 --ignore-all-space --exit-code --quiet --ext-diff
638 __gitcomp
"$(__git_refs)"
643 local cur
="${COMP_WORDS[COMP_CWORD]}"
645 case "${COMP_WORDS[0]},$COMP_CWORD" in
647 __gitcomp
"$(__git_remotes)"
650 __gitcomp
"$(__git_remotes)"
655 __gitcomp
"$(__git_refs)" "" "${cur#*:}"
659 case "${COMP_WORDS[0]}" in
660 git-fetch
) remote
="${COMP_WORDS[1]}" ;;
661 git
) remote
="${COMP_WORDS[2]}" ;;
663 __gitcomp
"$(__git_refs2 "$remote")"
672 local cur
="${COMP_WORDS[COMP_CWORD]}"
676 --stdout --attach --thread
678 --numbered --start-number
683 --full-index --binary
690 __git_complete_revlist
695 local cur
="${COMP_WORDS[COMP_CWORD]}"
698 __gitcomp
"--prune --aggressive"
707 __gitcomp
"$(__git_remotes)"
717 local cur
="${COMP_WORDS[COMP_CWORD]}"
721 oneline short medium full fuller email raw
722 " "" "${cur##--pretty=}"
727 relative iso8601 rfc2822 short local default
728 " "" "${cur##--date=}"
733 --max-count= --max-age= --since= --after=
734 --min-age= --before= --until=
735 --root --topo-order --date-order --reverse
737 --abbrev-commit --abbrev=
738 --relative-date --date=
739 --author= --committer= --grep=
741 --pretty= --name-status --name-only --raw
743 --left-right --cherry-pick
748 __git_complete_revlist
753 local cur
="${COMP_WORDS[COMP_CWORD]}"
754 case "${COMP_WORDS[COMP_CWORD-1]}" in
756 __gitcomp
"$(__git_merge_strategies)"
761 __gitcomp
"$(__git_merge_strategies)" "" "${cur##--strategy=}"
766 --no-commit --no-summary --squash --strategy
770 __gitcomp
"$(__git_refs)"
775 __gitcomp
"$(__git_refs)"
780 __gitcomp
"--tags --all --stdin"
785 local cur
="${COMP_WORDS[COMP_CWORD]}"
787 case "${COMP_WORDS[0]},$COMP_CWORD" in
789 __gitcomp
"$(__git_remotes)"
792 __gitcomp
"$(__git_remotes)"
796 case "${COMP_WORDS[0]}" in
797 git-pull
) remote
="${COMP_WORDS[1]}" ;;
798 git
) remote
="${COMP_WORDS[2]}" ;;
800 __gitcomp
"$(__git_refs "$remote")"
807 local cur
="${COMP_WORDS[COMP_CWORD]}"
809 case "${COMP_WORDS[0]},$COMP_CWORD" in
811 __gitcomp
"$(__git_remotes)"
814 __gitcomp
"$(__git_remotes)"
820 case "${COMP_WORDS[0]}" in
821 git-push
) remote
="${COMP_WORDS[1]}" ;;
822 git
) remote
="${COMP_WORDS[2]}" ;;
824 __gitcomp
"$(__git_refs "$remote")" "" "${cur#*:}"
827 __gitcomp
"$(__git_refs)" + "${cur#+}"
830 __gitcomp
"$(__git_refs)"
839 local cur
="${COMP_WORDS[COMP_CWORD]}"
840 if [ -d .dotest
] ||
[ -d .git
/.dotest-merge
]; then
841 __gitcomp
"--continue --skip --abort"
844 case "${COMP_WORDS[COMP_CWORD-1]}" in
846 __gitcomp
"$(__git_merge_strategies)"
851 __gitcomp
"$(__git_merge_strategies)" "" "${cur##--strategy=}"
855 __gitcomp
"--onto --merge --strategy"
858 __gitcomp
"$(__git_refs)"
863 local cur
="${COMP_WORDS[COMP_CWORD]}"
864 local prv
="${COMP_WORDS[COMP_CWORD-1]}"
867 __gitcomp
"$(__git_remotes)"
871 __gitcomp
"$(__git_refs)"
875 local remote
="${prv#remote.}"
876 remote
="${remote%.fetch}"
877 __gitcomp
"$(__git_refs_remotes "$remote")"
881 local remote
="${prv#remote.}"
882 remote
="${remote%.push}"
883 __gitcomp
"$(git --git-dir="$
(__gitdir
)" \
884 for-each-ref --format='%(refname):%(refname)' \
888 pull.twohead|pull.octopus
)
889 __gitcomp
"$(__git_merge_strategies)"
892 color.branch|color.
diff|color.status
)
893 __gitcomp
"always never auto"
898 black red green yellow blue magenta cyan white
899 bold dim ul blink reverse
911 --global --system --file=
913 --get --get-all --get-regexp
914 --add --unset --unset-all
915 --remove-section --rename-section
920 local pfx
="${cur%.*}."
922 __gitcomp
"remote merge" "$pfx" "$cur"
926 local pfx
="${cur%.*}."
928 __gitcomp
"$(__git_heads)" "$pfx" "$cur" "."
932 local pfx
="${cur%.*}."
935 url fetch push skipDefaultUpdate
936 receivepack uploadpack tagopt
941 local pfx
="${cur%.*}."
943 __gitcomp
"$(__git_remotes)" "$pfx" "$cur" "."
952 core.preferSymlinkRefs
953 core.logAllRefUpdates
954 core.loosecompression
955 core.repositoryFormatVersion
956 core.sharedRepository
957 core.warnAmbiguousRefs
960 core.packedGitWindowSize
975 color.diff.whitespace
981 color.status.untracked
990 gitcvs.dbname gitcvs.dbdriver gitcvs.dbuser gitcvs.dvpass
993 gc.reflogexpireunreachable
1006 i18n.logOutputEncoding
1016 pack.deltaCacheLimit
1019 repack.useDeltaBaseOffset
1023 transfer.unpackLimit
1025 receive.denyNonFastForwards
1029 whatchanged.difftree
1037 while [ $c -lt $COMP_CWORD ]; do
1038 i
="${COMP_WORDS[c]}"
1040 add|
rm|show|prune|update
) command="$i"; break ;;
1045 if [ -z "$command" ]; then
1046 __gitcomp
"add rm show prune update"
1052 __gitcomp
"$(__git_remotes)"
1055 local i c
='' IFS
=$
'\n'
1056 for i
in $
(git
--git-dir="$(__gitdir)" config
--list); do
1074 local cur
="${COMP_WORDS[COMP_CWORD]}"
1077 __gitcomp
"--mixed --hard --soft"
1081 __gitcomp
"$(__git_refs)"
1086 local cur
="${COMP_WORDS[COMP_CWORD]}"
1090 --max-count= --max-age= --since= --after=
1091 --min-age= --before= --until=
1093 --author= --committer= --grep=
1096 --numbered --summary
1101 __git_complete_revlist
1106 local cur
="${COMP_WORDS[COMP_CWORD]}"
1110 oneline short medium full fuller email raw
1111 " "" "${cur##--pretty=}"
1115 __gitcomp
"--pretty="
1124 __gitcomp
'list show apply clear'
1130 while [ $c -lt $COMP_CWORD ]; do
1131 i
="${COMP_WORDS[c]}"
1133 add|status|init|update
) command="$i"; break ;;
1138 if [ -z "$command" ]; then
1139 local cur
="${COMP_WORDS[COMP_CWORD]}"
1142 __gitcomp
"--quiet --cached"
1145 __gitcomp
"add status init update"
1155 while [ $c -lt $COMP_CWORD ]; do
1156 i
="${COMP_WORDS[c]}"
1159 __gitcomp
"$(__git_tags)"
1169 case "${COMP_WORDS[COMP_CWORD-1]}" in
1175 __gitcomp
"$(__git_tags)"
1181 __gitcomp
"$(__git_refs)"
1188 local i c
=1 command __git_dir
1190 while [ $c -lt $COMP_CWORD ]; do
1191 i
="${COMP_WORDS[c]}"
1193 --git-dir=*) __git_dir
="${i#--git-dir=}" ;;
1194 --bare) __git_dir
="." ;;
1195 --version|
--help|
-p|
--paginate) ;;
1196 *) command="$i"; break ;;
1201 if [ -z "$command" ]; then
1202 case "${COMP_WORDS[COMP_CWORD]}" in
1203 --*=*) COMPREPLY
=() ;;
1212 *) __gitcomp
"$(__git_commands) $(__git_aliases)" ;;
1217 local expansion
=$
(__git_aliased_command
"$command")
1218 [ "$expansion" ] && command="$expansion"
1223 apply
) _git_apply
;;
1224 bisect
) _git_bisect
;;
1225 bundle
) _git_bundle
;;
1226 branch
) _git_branch
;;
1227 checkout
) _git_checkout
;;
1228 cherry
) _git_cherry
;;
1229 cherry-pick
) _git_cherry_pick
;;
1230 commit
) _git_commit
;;
1231 config
) _git_config
;;
1232 describe
) _git_describe
;;
1234 fetch
) _git_fetch
;;
1235 format-patch
) _git_format_patch
;;
1238 ls-remote
) _git_ls_remote
;;
1239 ls-tree
) _git_ls_tree
;;
1241 merge-base
) _git_merge_base
;;
1242 name-rev
) _git_name_rev
;;
1245 rebase
) _git_rebase
;;
1246 remote
) _git_remote
;;
1247 reset) _git_reset
;;
1248 shortlog
) _git_shortlog
;;
1250 show-branch
) _git_log
;;
1251 stash
) _git_stash
;;
1252 submodule
) _git_submodule
;;
1254 whatchanged
) _git_log
;;
1261 local cur
="${COMP_WORDS[COMP_CWORD]}"
1264 __gitcomp
"--not --all"
1268 __git_complete_revlist
1271 complete
-o default
-o nospace
-F _git git
1272 complete
-o default
-o nospace
-F _gitk gitk
1273 complete
-o default
-o nospace
-F _git_am git-am
1274 complete
-o default
-o nospace
-F _git_apply git-apply
1275 complete
-o default
-o nospace
-F _git_bisect git-bisect
1276 complete
-o default
-o nospace
-F _git_branch git-branch
1277 complete
-o default
-o nospace
-F _git_bundle git-bundle
1278 complete
-o default
-o nospace
-F _git_checkout git-checkout
1279 complete
-o default
-o nospace
-F _git_cherry git-cherry
1280 complete
-o default
-o nospace
-F _git_cherry_pick git-cherry-pick
1281 complete
-o default
-o nospace
-F _git_commit git-commit
1282 complete
-o default
-o nospace
-F _git_describe git-describe
1283 complete
-o default
-o nospace
-F _git_diff git-diff
1284 complete
-o default
-o nospace
-F _git_fetch git-fetch
1285 complete
-o default
-o nospace
-F _git_format_patch git-format-patch
1286 complete
-o default
-o nospace
-F _git_gc git-gc
1287 complete
-o default
-o nospace
-F _git_log git-log
1288 complete
-o default
-o nospace
-F _git_ls_remote git-ls-remote
1289 complete
-o default
-o nospace
-F _git_ls_tree git-ls-tree
1290 complete
-o default
-o nospace
-F _git_merge git-merge
1291 complete
-o default
-o nospace
-F _git_merge_base git-merge-base
1292 complete
-o default
-o nospace
-F _git_name_rev git-name-rev
1293 complete
-o default
-o nospace
-F _git_pull git-pull
1294 complete
-o default
-o nospace
-F _git_push git-push
1295 complete
-o default
-o nospace
-F _git_rebase git-rebase
1296 complete
-o default
-o nospace
-F _git_config git-config
1297 complete
-o default
-o nospace
-F _git_remote git-remote
1298 complete
-o default
-o nospace
-F _git_reset git-reset
1299 complete
-o default
-o nospace
-F _git_shortlog git-shortlog
1300 complete
-o default
-o nospace
-F _git_show git-show
1301 complete
-o default
-o nospace
-F _git_stash git-stash
1302 complete
-o default
-o nospace
-F _git_submodule git-submodule
1303 complete
-o default
-o nospace
-F _git_log git-show-branch
1304 complete
-o default
-o nospace
-F _git_tag git-tag
1305 complete
-o default
-o nospace
-F _git_log git-whatchanged
1307 # The following are necessary only for Cygwin, and only are needed
1308 # when the user has tab-completed the executable name and consequently
1309 # included the '.exe' suffix.
1311 if [ Cygwin
= "$(uname -o 2>/dev/null)" ]; then
1312 complete
-o default
-o nospace
-F _git_add git-add.exe
1313 complete
-o default
-o nospace
-F _git_apply git-apply.exe
1314 complete
-o default
-o nospace
-F _git git.exe
1315 complete
-o default
-o nospace
-F _git_branch git-branch.exe
1316 complete
-o default
-o nospace
-F _git_bundle git-bundle.exe
1317 complete
-o default
-o nospace
-F _git_cherry git-cherry.exe
1318 complete
-o default
-o nospace
-F _git_describe git-describe.exe
1319 complete
-o default
-o nospace
-F _git_diff git-diff.exe
1320 complete
-o default
-o nospace
-F _git_format_patch git-format-patch.exe
1321 complete
-o default
-o nospace
-F _git_log git-log.exe
1322 complete
-o default
-o nospace
-F _git_ls_tree git-ls-tree.exe
1323 complete
-o default
-o nospace
-F _git_merge_base git-merge-base.exe
1324 complete
-o default
-o nospace
-F _git_name_rev git-name-rev.exe
1325 complete
-o default
-o nospace
-F _git_push git-push.exe
1326 complete
-o default
-o nospace
-F _git_config git-config
1327 complete
-o default
-o nospace
-F _git_shortlog git-shortlog.exe
1328 complete
-o default
-o nospace
-F _git_show git-show.exe
1329 complete
-o default
-o nospace
-F _git_log git-show-branch.exe
1330 complete
-o default
-o nospace
-F _git_tag git-tag.exe
1331 complete
-o default
-o nospace
-F _git_log git-whatchanged.exe