git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Wu <peter@lekensteyn.nl>
To: git@vger.kernel.org
Subject: [PATCH 0/3] bash-completion fixes for global git options handling
Date: Wed, 28 Oct 2015 18:21:22 +0100	[thread overview]
Message-ID: <1446052885-11173-1-git-send-email-peter@lekensteyn.nl> (raw)

Hi,

These patches improve bash-completion when global git options are present.
Consider this problem:

    bash-4.3$ git -C ../linux sta<TAB>error: invalid key: alias.../linux

This happens because the current script is unaware of the -C option. In general,
global options are not handled well (patch 001 fixes this).

Patch 2 makes the completions more aware of the --git-dir option.

Patch 3 builds on previous patches and makes completions aware of the -C option.

Kind regards,
Peter

Peter Wu (3):
  completion: ignore git options for subcommand completion
  completion: pass --git-dir to more commands
  completion: handle git -C option

 contrib/completion/git-completion.bash | 119 ++++++++++++++++++++-------------
 1 file changed, 72 insertions(+), 47 deletions(-)

-- 
2.6.1

             reply	other threads:[~2015-10-28 17:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-28 17:21 Peter Wu [this message]
2015-10-28 17:21 ` [PATCH 1/3] completion: ignore git options for subcommand completion Peter Wu
2015-10-28 17:21 ` [PATCH 2/3] completion: pass --git-dir to more commands Peter Wu
2015-10-28 17:21 ` [PATCH 3/3] completion: handle git -C option Peter Wu

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=1446052885-11173-1-git-send-email-peter@lekensteyn.nl \
    --to=peter@lekensteyn.nl \
    --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).