From: SZEDER Gábor Date: Thu, 24 Sep 2009 12:23:15 GMT Subject: [PATCHv2] bash: teach 'git checkout' options Message-ID: <1253794995-9093-1-git-send-email-szeder@ira.uka.de> In-Reply-To: <20090922152846.GQ14660@spearce.org> Signed-off-by: SZEDER Gábor --- contrib/completion/git-completion.bash | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 8c268a1..a08e471 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -809,7 +809,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 () -- 1.6.5.rc2.85.gd02ad