From: SZEDER Gábor Date: Thu, 24 Sep 2009 12:23:15 +0000 (+0200) Subject: bash: teach 'git checkout' options X-Git-Url: https://repo.or.cz/w/git/spearce.git/commitdiff_plain/e648f8b6d0dc6fb7e8c8e3ed47eec6b12aaf450a bash: teach 'git checkout' options Signed-off-by: SZEDER Gábor Signed-off-by: Shawn O. Pearce --- diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 6fd7e1d329..2c2a0d4614 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 ()