[PATCH 1/9] add long options completion for 'git checkout'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



add long options completion to git checkout

Signed-off-by: Emmanuel Trillaud <etrillaud@xxxxxxxxx>
---
 contrib/completion/git-completion.bash |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index 745b5fb..bc5427f 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -815,8 +815,18 @@ _git_bundle ()
 _git_checkout ()
 {
 	__git_has_doubledash && return
-
-	__gitcomp "$(__git_refs)"
+    case "${COMP_WORDS[COMP_CWORD]}" in
+    --*)
+        __gitcomp "
+            --ours --theirs --track --no-track --merge
+            --conflict=
+            "
+            ;;
+    *)
+        __gitcomp "$(__git_refs)"
+        ;;
+    esac
+	
 }

 _git_cherry ()
-- 
1.6.4
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]