aboutsummaryrefslogtreecommitdiff
path: root/contrib/completion
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder@ira.uka.de>2009-09-24 14:23:15 +0200
committerShawn O. Pearce <spearce@spearce.org>2009-09-25 14:48:35 -0700
commite648f8b6d0dc6fb7e8c8e3ed47eec6b12aaf450a (patch)
tree3c74d025581ad4f2cc8bba2267923065ba0eb3d3 /contrib/completion
parentefe47f8f2c7d4e2b7ebedc15dbdd2cc51912b56f (diff)
downloadgit-e648f8b6d0dc6fb7e8c8e3ed47eec6b12aaf450a.tar.gz
git-e648f8b6d0dc6fb7e8c8e3ed47eec6b12aaf450a.tar.xz
bash: teach 'git checkout' options
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'contrib/completion')
-rwxr-xr-xcontrib/completion/git-completion.bash16
1 files changed, 15 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 6fd7e1d32..2c2a0d461 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -810,7 +810,21 @@ _git_checkout ()
{
__git_has_doubledash && return
- __gitcomp "$(__git_refs)"
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ case "$cur" in
+ --conflict=*)
+ __gitcomp "diff3 merge" "" "${cur##--conflict=}"
+ ;;
+ --*)
+ __gitcomp "
+ --quiet --ours --theirs --track --no-track --merge
+ --conflict= --patch
+ "
+ ;;
+ *)
+ __gitcomp "$(__git_refs)"
+ ;;
+ esac
}
_git_cherry ()