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

Support 'help' for custom/alias commands

From
paul@pauldsmith.org.uk <paul@pauldsmith.org.uk>
Date
Feb 7, 2020, 11:02 UTC
Message-ID
<005001d5dda3$5bc12510$13436f30$@pauldsmith.org.uk>
In-Reply-To
<VI1P192MB025548BB0508125DF9B5852DC81C0@VI1P192MB0255.EURP192.PROD.OUTLOOK.COM>

Adding a custom comment (let’s call is ‘foolish’) is easy but then you someone types ‘git help foolish’, they get some strange message about help not being found.

There are two problems with this:
1. It’s hard for users to create good documentation in the same format as
the core git product 2. The git ‘help’ processing currently looks in one,
and one place only and that location is often ‘locked down’ meaning that
mere users cannot add their custom help to this directory.

I propose that #1 be solved by creating a command/tool and documentation that explains how to mimic the input to the standard Git help files and have them processed to create the HTML/HTML5/MAN help normally produced.  Ideally it would do exactly the same processing as the core tools (perhaps even having their docs built using this tool now) and use exactly the same template files that core git uses.

I propose that #2 be solved by allowing a new set of ‘git config’ fields. The layout should be sensible and should users to be able to set a git variable which then means that the core git help finds their help text. Possible we want to force

<where I installed my tool>/docs/man, or html, or html5

And the git config variable be something like “help.custom.foolish=<where-foolish-is-installed>/docs”

Paul DS.

P.S. I have a perfectly respectable e-mail address at paul_d_smith@hotmail.com which I have used for years - why won't you accept e-mails from it?

Next: Konstantin Khomoutov
Message 1 of 6 in “Support 'help' for custom/alias commands”
  1. paul@pauldsmith.org.ukFeb 7, 2020
  2. Konstantin KhomoutovFeb 7, 2020
  3. paul@pauldsmith.org.ukFeb 9, 2020
  4. brian m. carlsonFeb 7, 2020
  5. paul@pauldsmith.org.ukFeb 9, 2020
  6. brian m. carlsonFeb 9, 2020

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.