Re:The Elements of Git
by mdaniel on Sunday September 19, 2021 @10:56PM
(#28589970)
"git help -a" specifically performs that same discovery process and lists what it finds (including aliases!), so one need not reinvent that wheel
[ Parent
| on HN ]
Re:The Elements of Git
by sillysaurusx on Sunday September 19, 2021 @11:02PM
(#28590006)
It seems like `git help -a` doesn't allow third-party commands to have docstrings at all. It seems to call getenv("PATH"), then calls readdir on each folder, filters out any non-executables that aren't prefixed with "git-", and then lists those under the "External commands" category with no further help.
I was hoping there was a way to attach a short help descriptor to each of the third-party commands. But the help descriptors seem to be hardcoded for the builtin commands, with no support for third party commands. Darn.