git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Erik Cervin Edin <erik@cervined.in>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Sean Allred" <allred.sean@gmail.com>,
	git@vger.kernel.org
Subject: Re: Custom subcommand help handlers
Date: Mon, 20 Dec 2021 22:54:44 +0000	[thread overview]
Message-ID: <YcEJtOknDjSgxK5j@camp.crustytoothpaste.net> (raw)
In-Reply-To: <CA+JQ7M8oxzUAkw-Nv4X+3bJt7cBhsUaqFKd67Y=LNLnv2kgM+Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1155 bytes --]

On 2021-12-20 at 12:37:26, Erik Cervin Edin wrote:
> It looks like any git cmd --help is transformed into
> "git help --exclude-guides cmd"
> This is used to differentiate "git cmd --help" and "git help cmd".
> 
> It's used with aliases to print the alias as well as execute "git help cmd"
> Maybe something similar can be done for non built-ins that are missing
> man-pages / html-docs

I don't know that you can effectively distinguish whether there's
documentation for man.  It isn't guaranteed that it will exit
differently if the page is missing versus if it encountered an error.

One thought I have is that on some Unix systems, you can use MANPATH to
set a list of directories in which to search for manual pages.  Maybe
there's a standard environment variable that I'm not aware of that would
provide a similar functionality.

I should point out that in most cases on Unix, it _is_ expected that you
install your manual pages into the same place as everyone else, so in
this case, installing the HTML documentation alongside Git's may be the
best solution.
-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2021-12-20 22:54 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
2021-12-20 12:37   ` Erik Cervin Edin
2021-12-20 22:54     ` brian m. carlson [this message]
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=YcEJtOknDjSgxK5j@camp.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=allred.sean@gmail.com \
    --cc=avarab@gmail.com \
    --cc=erik@cervined.in \
    --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).