From: cornelius.weig@tngtech.com
To: git@vger.kernel.org
Cc: szeder.dev@gmail.com, j6t@kdbg.org,
Cornelius Weig <cornelius.weig@tngtech.com>
Subject: [PATCH v2 5/7] completion: teach replace to complete options
Date: Fri, 3 Feb 2017 12:01:57 +0100 [thread overview]
Message-ID: <20170203110159.377-6-cornelius.weig@tngtech.com> (raw)
In-Reply-To: <20170203110159.377-1-cornelius.weig@tngtech.com>
From: Cornelius Weig <cornelius.weig@tngtech.com>
Git-replace needs to complete references and its own options. In
addition to the existing references completions, do also complete the
options --edit --graft --format= --list --delete.
Signed-off-by: Cornelius Weig <cornelius.weig@tngtech.com>
Reviewed-by: SZEDER Gábor <szeder.dev@gmail.com>
---
contrib/completion/git-completion.bash | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index a355eeb..4841036 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2408,6 +2408,12 @@ _git_remote ()
_git_replace ()
{
+ case "$cur" in
+ --*)
+ __gitcomp "--edit --graft --format= --list --delete"
+ return
+ ;;
+ esac
__gitcomp_nl "$(__git_refs)"
}
--
2.10.2
next prev parent reply other threads:[~2017-02-03 11:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-03 11:01 [PATCH v2 0/7] completion bash: add more options and commands cornelius.weig
2017-02-03 11:01 ` [PATCH v2 1/7] completion: teach submodule subcommands to complete options cornelius.weig
2017-02-03 11:01 ` [PATCH v2 2/7] completion: add subcommand completion for rerere cornelius.weig
2017-02-03 11:01 ` [PATCH v2 3/7] completion: improve bash completion for git-add cornelius.weig
2017-02-03 11:01 ` [PATCH v2 4/7] completion: teach ls-remote to complete options cornelius.weig
2017-02-03 11:01 ` cornelius.weig [this message]
2017-02-03 11:01 ` [PATCH v2 6/7] completion: teach remote subcommands " cornelius.weig
2017-02-03 11:01 ` [PATCH v2 7/7] completion: recognize more long-options cornelius.weig
2017-02-06 21:29 ` [PATCH v2 0/7] completion bash: add more options and commands Junio C Hamano
2017-02-07 9:00 ` Johannes Sixt
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=20170203110159.377-6-cornelius.weig@tngtech.com \
--to=cornelius.weig@tngtech.com \
--cc=git@vger.kernel.org \
--cc=j6t@kdbg.org \
--cc=szeder.dev@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.