git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Git List <git@vger.kernel.org>
Cc: "SZEDER Gábor" <szeder@ira.uka.de>
Subject: [PATCH 2/4] completion: add completer for status
Date: Fri, 28 Jun 2013 19:48:06 +0530	[thread overview]
Message-ID: <1372429088-385-3-git-send-email-artagnon@gmail.com> (raw)
In-Reply-To: <1372429088-385-1-git-send-email-artagnon@gmail.com>

Helped-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 contrib/completion/git-completion.bash | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index b51c9e3..278018f 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1699,6 +1699,33 @@ _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 --ignored
+			--untracked-files --ignore-submodules --column
+			--untracked-files= --ignore-submodules= --column=
+			"
+		return
+		;;
+	esac
+	__git_complete_index_file "--with-tree=HEAD --cached --others"
+}
+
 __git_config_get_set_variables ()
 {
 	local prevword word config_file= c=$cword
-- 
1.8.3.1.585.g9832cb9

  parent reply	other threads:[~2013-06-28 14:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-28 14:18 [PATCH 0/4] Batch completion improvements Ramkumar Ramachandra
2013-06-28 14:18 ` [PATCH 1/4] completion: complete rebase --edit-todo Ramkumar Ramachandra
2013-06-28 14:18 ` Ramkumar Ramachandra [this message]
2013-06-30 11:19   ` [PATCH 2/4] completion: add completer for status SZEDER Gábor
2013-06-30 11:24     ` Ramkumar Ramachandra
2013-06-28 14:18 ` [PATCH 3/4] completion: add completer for rev-parse Ramkumar Ramachandra
2013-06-30 11:14   ` SZEDER Gábor
2013-06-30 11:17     ` Ramkumar Ramachandra
2013-06-30 19:03     ` Junio C Hamano
2013-07-03 10:30       ` Ramkumar Ramachandra
2013-06-28 14:18 ` [PATCH 4/4] completion: prefer to use local git-completion.bash Ramkumar Ramachandra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1372429088-385-3-git-send-email-artagnon@gmail.com \
    --to=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=szeder@ira.uka.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).