git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bash completion: Add long options for 'git describe'
@ 2008-07-25 10:02 Thomas Rast
  2008-07-25 13:15 ` SZEDER Gábor
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Rast @ 2008-07-25 10:02 UTC (permalink / raw)
  To: git; +Cc: gitster, Shawn O. Pearce

---

It seemed so tedious to type --always so I wrote this instead ;-)

 contrib/completion/git-completion.bash |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 3b04934..421431c 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -665,6 +665,17 @@ _git_commit ()
 
 _git_describe ()
 {
+	__git_has_doubledash && return
+
+	local cur="${COMP_WORDS[COMP_CWORD]}"
+	case "$cur" in
+	--*)
+		__gitcomp "
+			--all --tags --contains --abbrev= --candidates=
+			--exact-match --debug --long --match --always
+			"
+		return
+	esac
 	__gitcomp "$(__git_refs)"
 }
 
-- 
1.6.0.rc0.48.g3fa0a

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-07-26 21:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-25 10:02 [PATCH] bash completion: Add long options for 'git describe' Thomas Rast
2008-07-25 13:15 ` SZEDER Gábor
2008-07-25 16:20   ` Shawn O. Pearce
2008-07-26 10:25     ` Thomas Rast
2008-07-26 10:26     ` Thomas Rast
2008-07-26 21:52       ` Shawn O. Pearce

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).