git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kevin McConnell <kevin.mcconnell@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH] Add --staged to bash completion for git diff
Date: Sat, 21 Mar 2009 16:29:27 -0700	[thread overview]
Message-ID: <372194e70903211629w52705806l5a82c2dde19b73f7@mail.gmail.com> (raw)

The --staged option (synonym for --cached) isn't listed in the
completion choices for git diff.  This tiny patch adds it.
---
 contrib/completion/git-completion.bash |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index ed235f7..6bc32df 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -899,7 +899,7 @@ _git_diff ()
 	local cur="${COMP_WORDS[COMP_CWORD]}"
 	case "$cur" in
 	--*)
-		__gitcomp "--cached --pickaxe-all --pickaxe-regex
+		__gitcomp "--cached --staged --pickaxe-all --pickaxe-regex
 			--base --ours --theirs
 			$__git_diff_common_options
 			"
-- 
1.6.2.1

             reply	other threads:[~2009-03-21 23:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-21 23:29 Kevin McConnell [this message]
2009-03-23  0:33 ` [PATCH] Add --staged to bash completion for git diff Shawn O. Pearce

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

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

  git send-email \
    --in-reply-to=372194e70903211629w52705806l5a82c2dde19b73f7@mail.gmail.com \
    --to=kevin.mcconnell@gmail.com \
    --cc=git@vger.kernel.org \
    /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.
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 NNTP newsgroup(s).