git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH/RFC 0/2] Automate updating git-completion.bash a bit
@ 2018-01-16 10:36 Nguyễn Thái Ngọc Duy
  2018-01-16 10:36 ` [PATCH 1/2] parse-options: support --git-completion-helper Nguyễn Thái Ngọc Duy
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Nguyễn Thái Ngọc Duy @ 2018-01-16 10:36 UTC (permalink / raw)
  To: git; +Cc: SZEDER Gábor, Nguyễn Thái Ngọc Duy

I noticed --recurse-submodules was missing from git-grep complete
list. Then I found a couple more should be on the list as well and
many more in future may face the same faith. Perhaps this helps remedy
this situation?

This lets us extract certain information from git commands and feed it
directly to git-completion.bash. Now long options by default will
be complete-able (which also means it's the reviewer's and coder's
responsibility to add "no complete" flag appropriately) but I think
the number of new dangerous options will be much fewer than
completeable ones.

This is not really a new idea. Python has argcomplete that does more
or less the same thing.

This is just a proof of concept. More commands should be converted of
course if it's a good thing to do.

Nguyễn Thái Ngọc Duy (2):
  parse-options: support --git-completion-helper
  git-completion: use --git-completion-helper

 builtin/grep.c                         | 13 +++++++-----
 contrib/completion/git-completion.bash | 16 +--------------
 parse-options.c                        | 37 ++++++++++++++++++++++++++++++++++
 parse-options.h                        | 14 ++++++++-----
 4 files changed, 55 insertions(+), 25 deletions(-)

-- 
2.15.1.600.g899a5f85c6


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-04-11 11:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-16 10:36 [PATCH/RFC 0/2] Automate updating git-completion.bash a bit Nguyễn Thái Ngọc Duy
2018-01-16 10:36 ` [PATCH 1/2] parse-options: support --git-completion-helper Nguyễn Thái Ngọc Duy
2018-01-16 18:25   ` Jacob Keller
2018-01-17  0:21     ` Duy Nguyen
2018-01-16 23:46   ` Junio C Hamano
2018-01-17  0:27     ` Duy Nguyen
2018-01-16 10:37 ` [PATCH 2/2] git-completion: use --git-completion-helper Nguyễn Thái Ngọc Duy
2018-01-17  0:51 ` [PATCH/RFC 0/2] Automate updating git-completion.bash a bit SZEDER Gábor
2018-01-17  9:16   ` Duy Nguyen
2018-01-17  9:34     ` Duy Nguyen
2018-01-22 18:03       ` SZEDER Gábor
2018-01-23  9:59         ` Duy Nguyen
2019-04-11 11:10   ` Duy Nguyen
2019-04-11 11:11     ` Duy Nguyen

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).