From: SZEDER Gábor Date: Tue, 15 Sep 2009 10:21:46 GMT Subject: [PATCH 4/4] bash: teach 'git checkout' options Message-ID: <7c8c4f6a4c581bcba101b8ca467d241738aa376e.1253009868.git.szeder@ira.uka.de> In-Reply-To: Signed-off-by: SZEDER Gábor --- contrib/completion/git-completion.bash | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 8c268a1..8e3cdbd 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -809,7 +809,18 @@ _git_checkout () { __git_has_doubledash && return - __gitcomp "$(__git_refs)" + local cur="${COMP_WORDS[COMP_CWORD]}" + case "$cur" in + --*) + __gitcomp " + --quiet --ours --theirs --track --no-track --merge + --conflict= --patch + " + ;; + *) + __gitcomp "$(__git_refs)" + ;; + esac } _git_cherry () -- 1.6.5.rc1.92.gee3c1