git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 7/7] completion: recognize more long-options

From
CWCornelius Weig <cornelius.weig@tngtech.com>
Date
Feb 1, 2017, 16:49 UTC
Message-ID
<2841d2de-32ad-eae8-6039-9251a40bb00e@tngtech.com>
In-Reply-To
<CAM0VKj=Ein4yrKG2aZnN7JU80ctZBQromcR6BEu-TyMLenLFCg@mail.gmail.com>
Hi Gabor,
 thanks for taking a look at these commits.
On 01/31/2017 11:17 PM, SZEDER Gábor wrote:
Show 14 quoted lines
> On Fri, Jan 27, 2017 at 10:17 PM,  <cornelius.weig@tngtech.com> wrote:
>> From: Cornelius Weig <cornelius.weig@tngtech.com>
>>
>> Recognize several new long-options for bash completion in the following
>> commands:
> 
> Adding more long options that git commands learn along the way is
> always an improvement.  However, seeing "_several_ new long options"
> (or "some long options" in one of the other patches in the series)
> makes the reader wonder: are these the only new long options missing
> or are there more?  If there are more, why only these are added?  If
> there aren't any more missing long options left, then please say so,
> e.g. "Add all missing long options, except the potentially
> desctructive ones, for the following commands: ...."
Personally, I agree with you that
> Adding more long options that git commands learn along the way is
> always an improvement.

However, people may start complaining that their terminal becomes too cluttered when doing a double-Tab. In my cover letter, I go to length about this. My assumption was that all options that are mentioned in the introduction of the command man-page should be important enough to have them in the completion list. I'll change my commit message accordingly.

>>  - rm: --force
> 
> '--force' is a potentially destructive option, too.
Thanks for spotting this.

Btw, I haven't found that non-destructive options should not be eligible for completion. To avoid confusion about this in the future, I suggest to also change the documentation:

index 933bb6e..96f1c7f 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -13,7 +13,7 @@
 #    *) git email aliases for git-send-email
 #    *) tree paths within 'ref:path/to/file' expressions
 #    *) file paths within current working directory and index
-#    *) common --long-options
+#    *) common non-destructive --long-options
 #
 # To use these routines:
 #


I take it you have also looked at the code itself? Then I would gladly
mention you as reviewer in my sign-off.
Previous: SZEDER GáborNext: SZEDER Gábor
Message 33 of 41 in “completion bash: add more options and commands”
  1. 0/7 completion bash: add more options and commandsbitte.keine.werbung.einwerfen@googlemail.com, Jan 22, 2017
  2. 1/7 completion: teach options to submodule subcommandsbitte.keine.werbung.einwerfen@googlemail.com, Jan 22, 2017
  3. 2/7 completion: add subcommand completion for rererebitte.keine.werbung.einwerfen@googlemail.com, Jan 22, 2017
  4. SZEDER GáborFeb 2, 2017
  5. Cornelius WeigFeb 2, 2017
  6. 4/7 completion: teach ls-remote to complete optionsbitte.keine.werbung.einwerfen@googlemail.com, Jan 22, 2017
  7. SZEDER GáborFeb 2, 2017
  8. Cornelius WeigFeb 2, 2017
  9. Junio C HamanoFeb 2, 2017
  10. 7/7 completion: recognize more long-optionsbitte.keine.werbung.einwerfen@googlemail.com, Jan 22, 2017
  11. Johannes SixtJan 24, 2017
  12. Cornelius WeigJan 24, 2017
  13. Junio C HamanoJan 24, 2017
  14. Cornelius WeigJan 24, 2017
  15. Stefan BellerJan 24, 2017
  16. Cornelius WeigJan 25, 2017
  17. Stefan Beller, Jan 25, 2017
  18. Cornelius WeigJan 25, 2017
  19. Stefan BellerJan 25, 2017
  20. Linus TorvaldsJan 25, 2017
  21. Eric WongJan 25, 2017
  22. Philip OakleyJan 25, 2017
  23. Stefan BellerJan 25, 2017
  24. Cornelius WeigJan 26, 2017
  25. Stefan BellerJan 26, 2017
  26. Junio C HamanoJan 26, 2017
  27. Philip OakleyJan 26, 2017
  28. Cornelius WeigJan 27, 2017
  29. Junio C HamanoJan 27, 2017
  30. 0/7 completion: recognize more long-optionscornelius.weig@tngtech.com, Jan 27, 2017
  31. 7/7 completion: recognize more long-optionscornelius.weig@tngtech.com, Jan 27, 2017
  32. SZEDER GáborJan 31, 2017
  33. Cornelius WeigFeb 1, 2017
  34. SZEDER GáborFeb 2, 2017
  35. Cornelius WeigFeb 2, 2017
  36. 3/7 completion: improve bash completion for git-addbitte.keine.werbung.einwerfen@googlemail.com, Jan 22, 2017
  37. 5/7 completion: teach replace to complete optionsbitte.keine.werbung.einwerfen@googlemail.com, Jan 22, 2017
  38. 6/7 completion: teach remote subcommands option completionbitte.keine.werbung.einwerfen@googlemail.com, Jan 22, 2017
  39. SZEDER GáborFeb 2, 2017
  40. Cornelius WeigFeb 2, 2017
  41. SZEDER GáborJan 31, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.