Skip to content

Commit e648f8b

Browse files
szederspearce
authored andcommitted
bash: teach 'git checkout' options
Signed-off-by: SZEDER Gábor <[email protected]> Signed-off-by: Shawn O. Pearce <[email protected]>
1 parent efe47f8 commit e648f8b

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

contrib/completion/git-completion.bash

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,21 @@ _git_checkout ()
810810
{
811811
__git_has_doubledash && return
812812

813-
__gitcomp "$(__git_refs)"
813+
local cur="${COMP_WORDS[COMP_CWORD]}"
814+
case "$cur" in
815+
--conflict=*)
816+
__gitcomp "diff3 merge" "" "${cur##--conflict=}"
817+
;;
818+
--*)
819+
__gitcomp "
820+
--quiet --ours --theirs --track --no-track --merge
821+
--conflict= --patch
822+
"
823+
;;
824+
*)
825+
__gitcomp "$(__git_refs)"
826+
;;
827+
esac
814828
}
815829

816830
_git_cherry ()

0 commit comments

Comments
 (0)