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 0/7] completion bash: add more options and commands
Date: Fri, 3 Feb 2017 12:01:52 +0100 [thread overview]
Message-ID: <20170203110159.377-1-cornelius.weig@tngtech.com> (raw)
From: Cornelius Weig <cornelius.weig@tngtech.com>
This is the re-roll of patch series <20170122225724.19360-1-cornelius.weig@tngtech.com>.
This patch series adds all long-options that are mentioned in the synopsis of
the man-page for the respective git-command. There are only a few exceptions,
as discussed in the above thread. For example, no unsafe options should be
completed.
Furthermore, the patches add subommand option completion for git-submodule and
git-remote.
Changes wrt first submission:
- improve completion for git-remote set-head & set-branches
- remove completion of unsafe options
- improve commit messages
- added sign-off :)
- rebase to current master
Cornelius Weig (7):
completion: teach submodule subcommands to complete options
completion: add subcommand completion for rerere
completion: improve bash completion for git-add
completion: teach ls-remote to complete options
completion: teach replace to complete options
completion: teach remote subcommands to complete options
completion: recognize more long-options
contrib/completion/git-completion.bash | 139 ++++++++++++++++++++++++++++-----
1 file changed, 118 insertions(+), 21 deletions(-)
Interdiff since first iteration:
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 87d3d2c..3545f6a 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -936,7 +936,7 @@ _git_apply ()
--apply --no-add --exclude=
--ignore-whitespace --ignore-space-change
--whitespace= --inaccurate-eof --verbose
- --recount --directory= --unsafe-paths
+ --recount --directory=
"
return
esac
@@ -1459,7 +1459,7 @@ _git_ls_remote ()
{
case "$cur" in
--*)
- __gitcomp "--heads --tags --refs --get-url"
+ __gitcomp "--heads --tags --refs --get-url --symref"
return
;;
esac
@@ -2415,9 +2415,18 @@ _git_remote ()
;;
add,*)
;;
+ set-head,--*)
+ __gitcomp "--auto --delete"
+ ;;
+ set-branches,--*)
+ __gitcomp "--add"
+ ;;
set-head,*|set-branches,*)
__git_complete_remote_or_refspec
;;
+ update,--*)
+ __gitcomp "--prune"
+ ;;
update,*)
__gitcomp "$(__git_get_config_variables "remotes")"
;;
@@ -2494,7 +2503,7 @@ _git_rm ()
{
case "$cur" in
--*)
- __gitcomp "--cached --dry-run --ignore-unmatch --quiet --force"
+ __gitcomp "--cached --dry-run --ignore-unmatch --quiet"
return
;;
esac
--
2.10.2
next 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 cornelius.weig [this message]
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 ` [PATCH v2 5/7] completion: teach replace " cornelius.weig
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-1-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.