1 # This is a git-cola extension for Git's git-completion.bash script
3 # This script must be sourced *after* Git's git-completion.bash script.
4 # See git.git's contrib/completion/git-completion.bash for details.
6 # Completion is provided for "git cola ..." and "git dag ..." via the
7 # _git_cola() and _git_dag() functions.
9 __git_cola_common_options
="--prompt --repo --version"
10 __git_cola_subcommands_list
=
12 __git_cola_common_opts
() {
13 __gitcomp
"$__git_cola_common_options $1"
17 __git_has_doubledash
&& return
19 if test -z "$__git_cola_subcommands_list"
21 __git_cola_subcommands_list
=$
(
22 git cola
--help-commands |
28 local subcommand
=$
(__git_find_on_cmdline
"$__git_cola_subcommands_list")
36 if test -z "$subcommand"
39 $__git_cola_subcommands_list
40 $__git_cola_common_options
57 __git_complete_revlist
58 __git_cola_common_opts
64 __git_cola_common_opts
--rebase
72 __gitcomp
"nowarn warn fix error error-all"
76 __gitcomp
"resolve recursive octopus ours subtree"
80 __gitcomp
"ours theirs patience
81 diff-algorithm=patience
82 diff-algorithm=minimal
83 diff-algorithm=histogram
97 __git_complete_revlist
98 __git_cola_common_opts
"
102 --committer-date-is-author-date
135 __git_complete_revlist
140 __git_cola_common_opts
146 __git_has_doubledash
&& return
148 if test "$prev" = "--max-count"
152 __git_cola_common_opts
--max-count
153 __git_complete_revlist