git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Marcus Griep <marcus@griep.us>
Date
Aug 15, 2008, 16:15 UTC
Message-ID
<1218816948-7864-1-git-send-email-marcus@griep.us>

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.
 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..76d56eb 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 glossary hooks ignore k modules
+		repository-layout tutorial tutorial-2
+		"
 }
 
 _git_init ()
-- 
1.6.0.rc2.6.g8eda3
Next: Jonathan Nieder
Message 1 of 12 in “bash-completion: Add non-command git help files to bash-completion”
  1. bash-completion: Add non-command git help files to bash-completionMarcus Griep, Aug 15, 2008
  2. Jonathan NiederAug 15, 2008
  3. Marcus GriepAug 15, 2008
  4. bash-completion: Add non-command git help files to bash-completionMarcus Griep, Aug 15, 2008
  5. Shawn O. PearceAug 15, 2008
  6. Junio C HamanoAug 16, 2008
  7. Junio C HamanoAug 15, 2008
  8. Marcus GriepAug 15, 2008
  9. Junio C HamanoAug 15, 2008
  10. Marcus GriepAug 15, 2008
  11. Pieter de BieAug 15, 2008
  12. Marcus GriepAug 15, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.