git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Sean Allred <allred.sean@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Custom subcommand help handlers
Date: Mon, 20 Dec 2021 12:11:16 +0100	[thread overview]
Message-ID: <211220.86k0fzwmq2.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <CABceR4ZW4rRWZnH0ZBkWty_H84Z4CmXque_LO+1edETEWrO8PQ@mail.gmail.com>


On Sat, Dec 18 2021, Sean Allred wrote:

> Hi folks,
>
> I've got a custom subcommand I'm distributing in my company to
> integrate with our bug-tracker. It's a pretty robust utility and has
> its own help function, but running `git foo --help` doesn't pass
> --help to my git-foo utility. I asked a question[1] about this
> scenario on the Windows fork and they directed me upstream.
>
> It sounds like `git foo --help` is internally consumed as `git help
> foo`, which forwards requests to info/man/web handlers per config.
> Being on Windows and knowing my peers as I do, the vast majority of my
> users won't be familiar with info or man. The HTML documentation used
> by the web handler is in a Git4Win-controlled installation directory
> that I'd really rather not touch/maintain. I really just want `git foo
> --help` to call `git-foo --help`.
>
> What's the best way to go about this?
>
> In the event the best next step is to start a patch, does it sound
> reasonable to simply not perform this `git foo --help` -> `git help
> foo` transformation for non-builtins? Or, while I don't relish the
> idea, would some kind of config option be needed?
>
> Best,
> Sean Allred
>
> [1]: https://github.com/git-for-windows/git/discussions/3553

I don't know if there's a solution that'll please everyone here, but
it's definitely not narrowing this to built-ins. E.g. "git send-email
--help" will expect to show the manual, so will "git annex --help".

  reply	other threads:[~2021-12-20 11:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-18 16:08 Custom subcommand help handlers Sean Allred
2021-12-20 11:11 ` Ævar Arnfjörð Bjarmason [this message]
2021-12-20 12:37   ` Erik Cervin Edin
2021-12-20 22:54     ` brian m. carlson
2021-12-20 23:06       ` Junio C Hamano
2021-12-21  9:12         ` Erik Cervin Edin
2021-12-22 16:19         ` Johannes Schindelin
2021-12-22 19:53           ` Junio C Hamano
2021-12-22 23:40             ` Erik Cervin Edin
2021-12-23  0:11               ` Junio C Hamano
2021-12-23 11:33                 ` Erik Cervin Edin
2021-12-23 15:07             ` Philip Oakley
2021-12-24  0:16               ` Junio C Hamano
2021-12-24 11:26                 ` Philip Oakley
2022-02-12 22:29                   ` Sean Allred
2021-12-20 22:39 ` Johannes Schindelin
2021-12-21  2:51   ` Ævar Arnfjörð Bjarmason
2021-12-22 16:16     ` Johannes Schindelin
2021-12-22 17:44       ` Ævar Arnfjörð Bjarmason
2022-02-12 22:23   ` Sean Allred

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=211220.86k0fzwmq2.gmgdl@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=allred.sean@gmail.com \
    --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).