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_find_subcommand
()
433 local word subcommand c
=1
435 while [ $c -lt $COMP_CWORD ]; do
436 word
="${COMP_WORDS[c]}"
437 for subcommand
in $1; do
438 if [ "$subcommand" = "$word" ]; then
447 __git_whitespacelist
="nowarn warn error error-all strip"
451 local cur
="${COMP_WORDS[COMP_CWORD]}"
452 if [ -d .dotest
]; then
453 __gitcomp
"--skip --resolved"
458 __gitcomp
"$__git_whitespacelist" "" "${cur##--whitespace=}"
463 --signoff --utf8 --binary --3way --interactive
473 local cur
="${COMP_WORDS[COMP_CWORD]}"
476 __gitcomp
"$__git_whitespacelist" "" "${cur##--whitespace=}"
481 --stat --numstat --summary --check --index
482 --cached --index-info --reverse --reject --unidiff-zero
483 --apply --no-add --exclude=
484 --whitespace= --inaccurate-eof --verbose
493 local cur
="${COMP_WORDS[COMP_CWORD]}"
496 __gitcomp
"--interactive --refresh"
504 local subcommands
="start bad good reset visualize replay log"
505 local subcommand
="$(__git_find_subcommand "$subcommands")"
506 if [ -z "$subcommand" ]; then
507 __gitcomp
"$subcommands"
511 case "$subcommand" in
513 __gitcomp
"$(__git_refs)"
523 local i c
=1 only_local_ref
="n" has_r
="n"
525 while [ $c -lt $COMP_CWORD ]; do
528 -d|
-m) only_local_ref
="y" ;;
534 case "${COMP_WORDS[COMP_CWORD]}" in
535 --*=*) COMPREPLY
=() ;;
538 --color --no-color --verbose --abbrev= --no-abbrev
543 if [ $only_local_ref = "y" -a $has_r = "n" ]; then
544 __gitcomp
"$(__git_heads)"
546 __gitcomp
"$(__git_refs)"
554 local mycword
="$COMP_CWORD"
555 case "${COMP_WORDS[0]}" in
557 local cmd
="${COMP_WORDS[2]}"
558 mycword
="$((mycword-1))"
561 local cmd
="${COMP_WORDS[1]}"
566 __gitcomp
"create list-heads verify unbundle"
574 __git_complete_revlist
583 __gitcomp
"$(__git_refs)"
588 __gitcomp
"$(__git_refs)"
593 local cur
="${COMP_WORDS[COMP_CWORD]}"
596 __gitcomp
"--edit --no-commit"
599 __gitcomp
"$(__git_refs)"
606 local cur
="${COMP_WORDS[COMP_CWORD]}"
610 --all --author= --signoff --verify --no-verify
611 --edit --amend --include --only
620 __gitcomp
"$(__git_refs)"
625 local cur
="${COMP_WORDS[COMP_CWORD]}"
628 __gitcomp
"--cached --stat --numstat --shortstat --summary
629 --patch-with-stat --name-only --name-status --color
630 --no-color --color-words --no-renames --check
631 --full-index --binary --abbrev --diff-filter
632 --find-copies-harder --pickaxe-all --pickaxe-regex
633 --text --ignore-space-at-eol --ignore-space-change
634 --ignore-all-space --exit-code --quiet --ext-diff
644 __gitcomp
"$(__git_refs)"
649 local cur
="${COMP_WORDS[COMP_CWORD]}"
651 case "${COMP_WORDS[0]},$COMP_CWORD" in
653 __gitcomp
"$(__git_remotes)"
656 __gitcomp
"$(__git_remotes)"
661 __gitcomp
"$(__git_refs)" "" "${cur#*:}"
665 case "${COMP_WORDS[0]}" in
666 git-fetch
) remote
="${COMP_WORDS[1]}" ;;
667 git
) remote
="${COMP_WORDS[2]}" ;;
669 __gitcomp
"$(__git_refs2 "$remote")"
678 local cur
="${COMP_WORDS[COMP_CWORD]}"
682 --stdout --attach --thread
684 --numbered --start-number
689 --full-index --binary
696 __git_complete_revlist
701 local cur
="${COMP_WORDS[COMP_CWORD]}"
704 __gitcomp
"--prune --aggressive"
713 __gitcomp
"$(__git_remotes)"
723 local cur
="${COMP_WORDS[COMP_CWORD]}"
727 oneline short medium full fuller email raw
728 " "" "${cur##--pretty=}"
733 relative iso8601 rfc2822 short local default
734 " "" "${cur##--date=}"
739 --max-count= --max-age= --since= --after=
740 --min-age= --before= --until=
741 --root --topo-order --date-order --reverse
743 --abbrev-commit --abbrev=
744 --relative-date --date=
745 --author= --committer= --grep=
747 --pretty= --name-status --name-only --raw
749 --left-right --cherry-pick
754 __git_complete_revlist
759 local cur
="${COMP_WORDS[COMP_CWORD]}"
760 case "${COMP_WORDS[COMP_CWORD-1]}" in
762 __gitcomp
"$(__git_merge_strategies)"
767 __gitcomp
"$(__git_merge_strategies)" "" "${cur##--strategy=}"
772 --no-commit --no-summary --squash --strategy
776 __gitcomp
"$(__git_refs)"
781 __gitcomp
"$(__git_refs)"
786 __gitcomp
"--tags --all --stdin"
791 local cur
="${COMP_WORDS[COMP_CWORD]}"
793 case "${COMP_WORDS[0]},$COMP_CWORD" in
795 __gitcomp
"$(__git_remotes)"
798 __gitcomp
"$(__git_remotes)"
802 case "${COMP_WORDS[0]}" in
803 git-pull
) remote
="${COMP_WORDS[1]}" ;;
804 git
) remote
="${COMP_WORDS[2]}" ;;
806 __gitcomp
"$(__git_refs "$remote")"
813 local cur
="${COMP_WORDS[COMP_CWORD]}"
815 case "${COMP_WORDS[0]},$COMP_CWORD" in
817 __gitcomp
"$(__git_remotes)"
820 __gitcomp
"$(__git_remotes)"
826 case "${COMP_WORDS[0]}" in
827 git-push
) remote
="${COMP_WORDS[1]}" ;;
828 git
) remote
="${COMP_WORDS[2]}" ;;
830 __gitcomp
"$(__git_refs "$remote")" "" "${cur#*:}"
833 __gitcomp
"$(__git_refs)" + "${cur#+}"
836 __gitcomp
"$(__git_refs)"
845 local cur
="${COMP_WORDS[COMP_CWORD]}"
846 if [ -d .dotest
] ||
[ -d .git
/.dotest-merge
]; then
847 __gitcomp
"--continue --skip --abort"
850 case "${COMP_WORDS[COMP_CWORD-1]}" in
852 __gitcomp
"$(__git_merge_strategies)"
857 __gitcomp
"$(__git_merge_strategies)" "" "${cur##--strategy=}"
861 __gitcomp
"--onto --merge --strategy"
864 __gitcomp
"$(__git_refs)"
869 local cur
="${COMP_WORDS[COMP_CWORD]}"
870 local prv
="${COMP_WORDS[COMP_CWORD-1]}"
873 __gitcomp
"$(__git_remotes)"
877 __gitcomp
"$(__git_refs)"
881 local remote
="${prv#remote.}"
882 remote
="${remote%.fetch}"
883 __gitcomp
"$(__git_refs_remotes "$remote")"
887 local remote
="${prv#remote.}"
888 remote
="${remote%.push}"
889 __gitcomp
"$(git --git-dir="$
(__gitdir
)" \
890 for-each-ref --format='%(refname):%(refname)' \
894 pull.twohead|pull.octopus
)
895 __gitcomp
"$(__git_merge_strategies)"
898 color.branch|color.
diff|color.status
)
899 __gitcomp
"always never auto"
904 black red green yellow blue magenta cyan white
905 bold dim ul blink reverse
917 --global --system --file=
919 --get --get-all --get-regexp
920 --add --unset --unset-all
921 --remove-section --rename-section
926 local pfx
="${cur%.*}."
928 __gitcomp
"remote merge" "$pfx" "$cur"
932 local pfx
="${cur%.*}."
934 __gitcomp
"$(__git_heads)" "$pfx" "$cur" "."
938 local pfx
="${cur%.*}."
941 url fetch push skipDefaultUpdate
942 receivepack uploadpack tagopt
947 local pfx
="${cur%.*}."
949 __gitcomp
"$(__git_remotes)" "$pfx" "$cur" "."
958 core.preferSymlinkRefs
959 core.logAllRefUpdates
960 core.loosecompression
961 core.repositoryFormatVersion
962 core.sharedRepository
963 core.warnAmbiguousRefs
966 core.packedGitWindowSize
981 color.diff.whitespace
987 color.status.untracked
996 gitcvs.dbname gitcvs.dbdriver gitcvs.dbuser gitcvs.dvpass
999 gc.reflogexpireunreachable
1012 i18n.logOutputEncoding
1022 pack.deltaCacheLimit
1025 repack.useDeltaBaseOffset
1029 transfer.unpackLimit
1031 receive.denyNonFastForwards
1035 whatchanged.difftree
1042 local subcommands
="add rm show prune update"
1043 local subcommand
="$(__git_find_subcommand "$subcommands")"
1044 if [ -z "$subcommand" ]; then
1048 case "$subcommand" in
1050 __gitcomp
"$(__git_remotes)"
1053 local i c
='' IFS
=$
'\n'
1054 for i
in $
(git
--git-dir="$(__gitdir)" config
--list); do
1072 local cur
="${COMP_WORDS[COMP_CWORD]}"
1075 __gitcomp
"--mixed --hard --soft"
1079 __gitcomp
"$(__git_refs)"
1084 local cur
="${COMP_WORDS[COMP_CWORD]}"
1088 --max-count= --max-age= --since= --after=
1089 --min-age= --before= --until=
1091 --author= --committer= --grep=
1094 --numbered --summary
1099 __git_complete_revlist
1104 local cur
="${COMP_WORDS[COMP_CWORD]}"
1108 oneline short medium full fuller email raw
1109 " "" "${cur##--pretty=}"
1113 __gitcomp
"--pretty="
1122 local subcommands
='list show apply clear'
1123 if [ -z "$(__git_find_subcommand "$subcommands")" ]; then
1124 __gitcomp
"$subcommands"
1130 local subcommands
="add status init update"
1131 if [ -z "$(__git_find_subcommand "$subcommands")" ]; then
1132 local cur
="${COMP_WORDS[COMP_CWORD]}"
1135 __gitcomp
"--quiet --cached"
1138 __gitcomp
"$subcommands"
1148 while [ $c -lt $COMP_CWORD ]; do
1149 i
="${COMP_WORDS[c]}"
1152 __gitcomp
"$(__git_tags)"
1162 case "${COMP_WORDS[COMP_CWORD-1]}" in
1168 __gitcomp
"$(__git_tags)"
1174 __gitcomp
"$(__git_refs)"
1181 local i c
=1 command __git_dir
1183 while [ $c -lt $COMP_CWORD ]; do
1184 i
="${COMP_WORDS[c]}"
1186 --git-dir=*) __git_dir
="${i#--git-dir=}" ;;
1187 --bare) __git_dir
="." ;;
1188 --version|
--help|
-p|
--paginate) ;;
1189 *) command="$i"; break ;;
1194 if [ -z "$command" ]; then
1195 case "${COMP_WORDS[COMP_CWORD]}" in
1196 --*=*) COMPREPLY
=() ;;
1205 *) __gitcomp
"$(__git_commands) $(__git_aliases)" ;;
1210 local expansion
=$
(__git_aliased_command
"$command")
1211 [ "$expansion" ] && command="$expansion"
1216 apply
) _git_apply
;;
1217 bisect
) _git_bisect
;;
1218 bundle
) _git_bundle
;;
1219 branch
) _git_branch
;;
1220 checkout
) _git_checkout
;;
1221 cherry
) _git_cherry
;;
1222 cherry-pick
) _git_cherry_pick
;;
1223 commit
) _git_commit
;;
1224 config
) _git_config
;;
1225 describe
) _git_describe
;;
1227 fetch
) _git_fetch
;;
1228 format-patch
) _git_format_patch
;;
1231 ls-remote
) _git_ls_remote
;;
1232 ls-tree
) _git_ls_tree
;;
1234 merge-base
) _git_merge_base
;;
1235 name-rev
) _git_name_rev
;;
1238 rebase
) _git_rebase
;;
1239 remote
) _git_remote
;;
1240 reset) _git_reset
;;
1241 shortlog
) _git_shortlog
;;
1243 show-branch
) _git_log
;;
1244 stash
) _git_stash
;;
1245 submodule
) _git_submodule
;;
1247 whatchanged
) _git_log
;;
1254 local cur
="${COMP_WORDS[COMP_CWORD]}"
1257 __gitcomp
"--not --all"
1261 __git_complete_revlist
1264 complete
-o default
-o nospace
-F _git git
1265 complete
-o default
-o nospace
-F _gitk gitk
1266 complete
-o default
-o nospace
-F _git_am git-am
1267 complete
-o default
-o nospace
-F _git_apply git-apply
1268 complete
-o default
-o nospace
-F _git_bisect git-bisect
1269 complete
-o default
-o nospace
-F _git_branch git-branch
1270 complete
-o default
-o nospace
-F _git_bundle git-bundle
1271 complete
-o default
-o nospace
-F _git_checkout git-checkout
1272 complete
-o default
-o nospace
-F _git_cherry git-cherry
1273 complete
-o default
-o nospace
-F _git_cherry_pick git-cherry-pick
1274 complete
-o default
-o nospace
-F _git_commit git-commit
1275 complete
-o default
-o nospace
-F _git_describe git-describe
1276 complete
-o default
-o nospace
-F _git_diff git-diff
1277 complete
-o default
-o nospace
-F _git_fetch git-fetch
1278 complete
-o default
-o nospace
-F _git_format_patch git-format-patch
1279 complete
-o default
-o nospace
-F _git_gc git-gc
1280 complete
-o default
-o nospace
-F _git_log git-log
1281 complete
-o default
-o nospace
-F _git_ls_remote git-ls-remote
1282 complete
-o default
-o nospace
-F _git_ls_tree git-ls-tree
1283 complete
-o default
-o nospace
-F _git_merge git-merge
1284 complete
-o default
-o nospace
-F _git_merge_base git-merge-base
1285 complete
-o default
-o nospace
-F _git_name_rev git-name-rev
1286 complete
-o default
-o nospace
-F _git_pull git-pull
1287 complete
-o default
-o nospace
-F _git_push git-push
1288 complete
-o default
-o nospace
-F _git_rebase git-rebase
1289 complete
-o default
-o nospace
-F _git_config git-config
1290 complete
-o default
-o nospace
-F _git_remote git-remote
1291 complete
-o default
-o nospace
-F _git_reset git-reset
1292 complete
-o default
-o nospace
-F _git_shortlog git-shortlog
1293 complete
-o default
-o nospace
-F _git_show git-show
1294 complete
-o default
-o nospace
-F _git_stash git-stash
1295 complete
-o default
-o nospace
-F _git_submodule git-submodule
1296 complete
-o default
-o nospace
-F _git_log git-show-branch
1297 complete
-o default
-o nospace
-F _git_tag git-tag
1298 complete
-o default
-o nospace
-F _git_log git-whatchanged
1300 # The following are necessary only for Cygwin, and only are needed
1301 # when the user has tab-completed the executable name and consequently
1302 # included the '.exe' suffix.
1304 if [ Cygwin
= "$(uname -o 2>/dev/null)" ]; then
1305 complete
-o default
-o nospace
-F _git_add git-add.exe
1306 complete
-o default
-o nospace
-F _git_apply git-apply.exe
1307 complete
-o default
-o nospace
-F _git git.exe
1308 complete
-o default
-o nospace
-F _git_branch git-branch.exe
1309 complete
-o default
-o nospace
-F _git_bundle git-bundle.exe
1310 complete
-o default
-o nospace
-F _git_cherry git-cherry.exe
1311 complete
-o default
-o nospace
-F _git_describe git-describe.exe
1312 complete
-o default
-o nospace
-F _git_diff git-diff.exe
1313 complete
-o default
-o nospace
-F _git_format_patch git-format-patch.exe
1314 complete
-o default
-o nospace
-F _git_log git-log.exe
1315 complete
-o default
-o nospace
-F _git_ls_tree git-ls-tree.exe
1316 complete
-o default
-o nospace
-F _git_merge_base git-merge-base.exe
1317 complete
-o default
-o nospace
-F _git_name_rev git-name-rev.exe
1318 complete
-o default
-o nospace
-F _git_push git-push.exe
1319 complete
-o default
-o nospace
-F _git_config git-config
1320 complete
-o default
-o nospace
-F _git_shortlog git-shortlog.exe
1321 complete
-o default
-o nospace
-F _git_show git-show.exe
1322 complete
-o default
-o nospace
-F _git_log git-show-branch.exe
1323 complete
-o default
-o nospace
-F _git_tag git-tag.exe
1324 complete
-o default
-o nospace
-F _git_log git-whatchanged.exe