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

[PATCH 2/2] completion: add bash completion for 'filter-branch'

From
Denton Liu <liu.denton@gmail.com>
Date
Jan 9, 2017, 08:56 UTC
Message-ID
<20170109085617.GA527@arch-attack.localdomain>
Signed-off-by: Denton Liu <liu.denton@gmail.com>
---
 contrib/completion/git-completion.bash | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 51832108e..b4cbea5c7 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1297,6 +1297,23 @@ _git_fetch ()
 	__git_complete_remote_or_refspec
 }
 
+__git_filter_branch_options="
+	--env-filter --tree-filter --index-filter --parent-filter --msg-filter
+	--commit-filter --tag-name-filter --subdirectory-filter --prune-empty
+	--original --force
+"
+_git_filter_branch ()
+{
+	__git_has_doubledash && __git_complete_rev_list_command && return
+
+	case "$cur" in
+	--*)
+		__gitcomp "$__git_filter_branch_options"
+		return
+		;;
+	esac
+}
+
 __git_format_patch_options="
 	--stdout --attach --no-attach --thread --thread= --no-thread
 	--numbered --start-number --numbered-files --keep-subject --signoff
-- 
2.11.0
Message 1 of 1 in “completion: add bash completion for 'filter-branch'”
  1. 2/2 completion: add bash completion for 'filter-branch'Denton Liu, Jan 9, 2017

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.