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

[PATCH] bash completion: Add long options for 'git rm'

From
Lee Marlow <lee.marlow@gmail.com>
Date
Jul 23, 2008, 21:21 UTC
Message-ID
<1216848068-49674-1-git-send-email-lee.marlow@gmail.com>
Options added: --cached --dry-run --ignore-unmatch --quiet
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
---
 contrib/completion/git-completion.bash |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 2edb341..4b7ef69 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1170,6 +1170,20 @@ _git_reset ()
 	__gitcomp "$(__git_refs)"
 }
 
+_git_rm ()
+{
+	__git_has_doubledash && return
+
+	local cur="${COMP_WORDS[COMP_CWORD]}"
+	case "$cur" in
+	--*)
+		__gitcomp "--cached --dry-run --ignore-unmatch --quiet"
+		return
+		;;
+	esac
+	COMPREPLY=()
+}
+
 _git_shortlog ()
 {
 	__git_has_doubledash && return
@@ -1425,6 +1439,7 @@ _git ()
 	rebase)      _git_rebase ;;
 	remote)      _git_remote ;;
 	reset)       _git_reset ;;
+	rm)          _git_rm ;;
 	send-email)  _git_send_email ;;
 	shortlog)    _git_shortlog ;;
 	show)        _git_show ;;
-- 
1.6.0.rc0.14.g95f8
Message 1 of 1 in “bash completion: Add long options for 'git rm'”
  1. bash completion: Add long options for 'git rm'Lee Marlow, Jul 23, 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.