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

[PATCH] bash completion: show-branch color support

From
Markus Heidelberg <markus.heidelberg@web.de>
Date
Apr 25, 2009, 11:46 UTC
Message-ID
<1240659974-12161-1-git-send-email-markus.heidelberg@web.de>

This implements completion of --color and --no-color for "git show-branch" and color.showbranch for "git config".

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
---
   This goes on top of mh/show-branch-color which is currently in pu.
 contrib/completion/git-completion.bash |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 1a90cb8..b588387 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1333,7 +1333,8 @@ _git_config ()
 		__gitcomp "$(__git_merge_strategies)"
 		return
 		;;
-	color.branch|color.diff|color.interactive|color.status|color.ui)
+	color.branch|color.diff|color.interactive|\
+	color.showbranch|color.status|color.ui)
 		__gitcomp "always never auto"
 		return
 		;;
@@ -1415,6 +1416,7 @@ _git_config ()
 		color.interactive.help
 		color.interactive.prompt
 		color.pager
+		color.showbranch
 		color.status
 		color.status.added
 		color.status.changed
@@ -1676,6 +1678,7 @@ _git_show_branch ()
 		__gitcomp "
 			--all --remotes --topo-order --current --more=
 			--list --independent --merge-base --no-name
+			--color --no-color
 			--sha1-name --topics --reflog
 			"
 		return
-- 
1.6.3.rc1.84.g1036b
Message 1 of 1 in “bash completion: show-branch color support”
  1. bash completion: show-branch color supportMarkus Heidelberg, Apr 25, 2009

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.