[PATCH v2] bash-completion: Add non-command git help files to bash-completion

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Git Mailing List <git@...>
Cc: Shawn O. Pearce <spearce@...>, Junio C Hamano <gitster@...>, Jonathan Nieder <jrnieder@...>, Marcus Griep <marcus@...>
Date: Friday, August 15, 2008 - 1:59 pm

Git allows access to the gitattributes man page via `git help attributes`,
but this is not discoverable via the bash-completion mechanism.  This
patch adds all current non-command man pages to the completion candidate
list.

Signed-off-by: Marcus Griep <marcus@griep.us>
---

 By adding them to the help completion, man pages such as the tutorials, hooks,
 and .gitattributes are more accessible to random discovery from bash-completion.

 This patch also incorporates the suggestion that 'gitk' is an easier to grok
 completion than 'k'.

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

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index c0bf7aa..158b912 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -885,7 +885,11 @@ _git_help ()
 		return
 		;;
 	esac
-	__gitcomp "$(__git_all_commands)"
+	__gitcomp "$(__git_all_commands)
+		attributes cli core-tutorial cvs-migration
+		diffcore gitk glossary hooks ignore modules
+		repository-layout tutorial tutorial-2
+		"
 }
 
 _git_init ()
-- 
1.6.0.rc3.10.g5a13c

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH v2] bash-completion: Add non-command git help files t..., Marcus Griep, (Fri Aug 15, 1:59 pm)