Hello HP, All,
I somehow managed to forget this (age must be taking its toll), but
there is a convention commonly used for man pages of Perl Modules, which
can be reasonably usable for subcommands as well:
man APR::Brigade
will work just fine, with a file by the same name. This convention is in
current use, and would map to
man git::clone
while :: is not as immediate in context as in Perl, it does do the job,
and works regardless of pager.
I would still go with the single big page (people are used to
vi-search with "/" anyway), but if you want to split the manual this
would work, and you could refer to the pages explicitly in the main git
page.
Finally, and importantly, "apropos clone" or "man -k clone" would
correctly point to git::clone as a valid result.
One more option for you.
Best -F
Federico Lucifredi wrote:
Hello HP,
I have seen this in (funnily enough) a project I manage myself, which
has subcommands structured similarly to Git.
I have looked at options, but so far the current behavior (man foo-bar)
seems the best option for foo's subcommand bar. The alternative, also
acceptable, is a large page with subsections for each command. Sections
(man 1) are used for chapter-like page groupings, not for subsections on
a single command - those would have to be implemented as an additional
layer.
But, as another participant in the thread has commented, that would not
port to other platforms very quickly (although it would get to Linux and
OS-X promptly, and may eventually make its way into other platforms).
I am open to ideas, but so far the two options above are better than
anything else that has been so far suggested...
Best -F
H. Peter Anvin wrote:
Given the recent change of "git-foo" to "git foo", it would be really
nice if one could type, for example:
man git clone
and actually get the man page for the git clone command. There are
quite a few other pieces of software which also could benefit from
that kind of indirection.
Right now the above command shows the man page git(1) followed by
clone(2), which I believe has be classified as utterly useless
behaviour...
-hpa
--
_________________________________________
-- "'Problem' is a bleak word for challenge" - Richard Fish
(Federico L. Lucifredi) - flucifredi@xxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html