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

[PATCH] completion: add completer for status

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Jun 24, 2013, 17:22 UTC
Message-ID
<1372094575-20799-1-git-send-email-artagnon@gmail.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 contrib/completion/git-completion.bash | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 6c3bafe..912fb98 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1695,6 +1695,32 @@ _git_stage ()
 	_git_add
 }
 
+_git_status ()
+{
+	case "$cur" in
+	--untracked-files=*)
+		__gitcomp "no normal all" "" "${cur##--untracked-files=}"
+		return
+		;;
+	--ignore-submodules=*)
+		__gitcomp "none untracked dirty all" "" "${cur##--ignore-submodules=}"
+		return
+		;;
+	--column=*)
+		__gitcomp "always never auto column row plain dense nodense" "" "${cur##--column=}"
+		return
+		;;
+	--*)
+		__gitcomp "
+			--short --branch --long --porcelain
+			--untracked-files= --ignore-submodules= --ignored --column=
+			"
+		return
+		;;
+	esac
+	__git_complete_index_file
+}
+
 __git_config_get_set_variables ()
 {
 	local prevword word config_file= c=$cword
-- 
1.8.3.1.550.gd96f26e.dirty
Next: Ramkumar Ramachandra
Message 1 of 9 in “completion: add completer for status”
  1. completion: add completer for statusRamkumar Ramachandra, Jun 24, 2013
  2. Ramkumar RamachandraJun 24, 2013
  3. SZEDER GáborJun 28, 2013
  4. SZEDER GáborJun 28, 2013
  5. SZEDER GáborJun 28, 2013
  6. Ramkumar RamachandraJun 28, 2013
  7. Ramkumar RamachandraJun 28, 2013
  8. SZEDER GáborJun 30, 2013
  9. SZEDER GáborJun 28, 2013

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.