* Suggestion: "man git clone" @ 2008-08-21 0:11 H. Peter Anvin 2008-08-21 0:25 ` "Peter Valdemar Mørch (Lists)" ` (2 more replies) 0 siblings, 3 replies; 29+ messages in thread From: H. Peter Anvin @ 2008-08-21 0:11 UTC (permalink / raw) To: flucifredi, Git Mailing List 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 ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-21 0:11 Suggestion: "man git clone" H. Peter Anvin @ 2008-08-21 0:25 ` "Peter Valdemar Mørch (Lists)" 2008-08-21 16:37 ` H. Peter Anvin 2008-08-21 21:49 ` Federico Lucifredi 2008-08-22 11:02 ` Michael J Gruber 2 siblings, 1 reply; 29+ messages in thread From: "Peter Valdemar Mørch (Lists)" @ 2008-08-21 0:25 UTC (permalink / raw) To: git H. Peter Anvin hpa-at-zytor.com |Lists| 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 Sorry man that behaviour is the way "man" works. See "man man". $ git clone --help or $ git help clone work right? Peter P.S: man, there are puns in that... -- Peter Valdemar Mørch http://www.morch.com ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-21 0:25 ` "Peter Valdemar Mørch (Lists)" @ 2008-08-21 16:37 ` H. Peter Anvin 2008-08-21 17:07 ` Avery Pennarun 2008-08-22 11:37 ` A Large Angry SCM 0 siblings, 2 replies; 29+ messages in thread From: H. Peter Anvin @ 2008-08-21 16:37 UTC (permalink / raw) To: "Peter Valdemar Mørch (Lists)"; +Cc: git Peter Valdemar Mørch (Lists) wrote: > > Sorry man that behaviour is the way "man" works. See "man man". > > $ git clone --help > or > $ git help clone > > work right? > > Peter > > P.S: man, there are puns in that... I know that that is the way "man" currently works. I doubt you find *anyone* who relies on the current behaviour, so I am suggesting changing man. That's why the man author was on the recipient list, but you removed it. -hpa ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-21 16:37 ` H. Peter Anvin @ 2008-08-21 17:07 ` Avery Pennarun 2008-08-21 17:22 ` H. Peter Anvin 2008-08-22 11:37 ` A Large Angry SCM 1 sibling, 1 reply; 29+ messages in thread From: Avery Pennarun @ 2008-08-21 17:07 UTC (permalink / raw) To: H. Peter Anvin Cc: "Peter Valdemar Mørch (Lists)", flucifredi, Git ML On Thu, Aug 21, 2008 at 12:37 PM, H. Peter Anvin <hpa@zytor.com> wrote: > man git clone > > [...] > > I doubt you find *anyone* who relies on the current behaviour, so I am > suggesting changing man. That's why the man author was on the recipient > list, but you removed it. > [and I put him back...] Unfortunately what we don't have is a proposal that would work better. Also, changing the behaviour of 'man' wouldn't work on any platform other than Linux (presumably), which means the git documentation wouldn't be able to rely on that behaviour. Still, in a perfect world, what *should* man do in such a case? Automatically open /usr/man/man1/git/clone.1? Thanks, Avery ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-21 17:07 ` Avery Pennarun @ 2008-08-21 17:22 ` H. Peter Anvin 2008-08-21 17:38 ` Jeff King 2008-08-21 17:52 ` Bert Wesarg 0 siblings, 2 replies; 29+ messages in thread From: H. Peter Anvin @ 2008-08-21 17:22 UTC (permalink / raw) To: Avery Pennarun Cc: "Peter Valdemar Mørch (Lists)", flucifredi, Git ML Avery Pennarun wrote: > > [and I put him back...] > > Unfortunately what we don't have is a proposal that would work better. > Also, changing the behaviour of 'man' wouldn't work on any platform > other than Linux (presumably), which means the git documentation > wouldn't be able to rely on that behaviour. > > Still, in a perfect world, what *should* man do in such a case? > Automatically open /usr/man/man1/git/clone.1? > That would probably be the best option, other options are $MANPATH/man1/git\ clone.1 or $MANPATH/mangit/clone.git (I actually tried that on the assumption that it might treat "git" as a section; unfortunately, it didn't work.) -hpa ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-21 17:22 ` H. Peter Anvin @ 2008-08-21 17:38 ` Jeff King 2008-08-21 20:13 ` Jeff King 2008-08-21 17:52 ` Bert Wesarg 1 sibling, 1 reply; 29+ messages in thread From: Jeff King @ 2008-08-21 17:38 UTC (permalink / raw) To: H. Peter Anvin Cc: Avery Pennarun, "Peter Valdemar Mørch (Lists)", flucifredi, Git ML On Thu, Aug 21, 2008 at 10:22:47AM -0700, H. Peter Anvin wrote: > That would probably be the best option, other options are > $MANPATH/man1/git\ clone.1 or $MANPATH/mangit/clone.git (I actually tried > that on the assumption that it might treat "git" as a section; > unfortunately, it didn't work.) There is some configuration magic about what is a section. Try perl -pi -e 's/^SECTION.*/$& git/' /etc/manpath.config That seems to convince my man to look in .../mangit, but I'm having trouble actually getting it to find a page and I don't have time to investigate further now. -Peff ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-21 17:38 ` Jeff King @ 2008-08-21 20:13 ` Jeff King 2008-08-21 20:14 ` H. Peter Anvin 0 siblings, 1 reply; 29+ messages in thread From: Jeff King @ 2008-08-21 20:13 UTC (permalink / raw) To: H. Peter Anvin Cc: Avery Pennarun, "Peter Valdemar Mørch (Lists)", flucifredi, Git ML On Thu, Aug 21, 2008 at 01:38:42PM -0400, Jeff King wrote: > There is some configuration magic about what is a section. Try > > perl -pi -e 's/^SECTION.*/$& git/' /etc/manpath.config > > That seems to convince my man to look in .../mangit, but I'm having > trouble actually getting it to find a page and I don't have time to > investigate further now. Ah, OK. My problem was that the pages actually need to be named "am.git", etc. But with 'git' in the section field, "man git am" does work. Unfortunately, it seems to break "man git". :( -Peff ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-21 20:13 ` Jeff King @ 2008-08-21 20:14 ` H. Peter Anvin 2008-08-21 20:18 ` Jeff King 0 siblings, 1 reply; 29+ messages in thread From: H. Peter Anvin @ 2008-08-21 20:14 UTC (permalink / raw) To: Jeff King Cc: Avery Pennarun, "Peter Valdemar Mørch (Lists)", flucifredi, Git ML Jeff King wrote: > On Thu, Aug 21, 2008 at 01:38:42PM -0400, Jeff King wrote: > >> There is some configuration magic about what is a section. Try >> >> perl -pi -e 's/^SECTION.*/$& git/' /etc/manpath.config >> >> That seems to convince my man to look in .../mangit, but I'm having >> trouble actually getting it to find a page and I don't have time to >> investigate further now. > > Ah, OK. My problem was that the pages actually need to be named "am.git", > etc. But with 'git' in the section field, "man git am" does work. > Unfortunately, it seems to break "man git". :( > > -Peff Yeah, that pretty much makes it not a general solution. -hpa ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-21 20:14 ` H. Peter Anvin @ 2008-08-21 20:18 ` Jeff King 0 siblings, 0 replies; 29+ messages in thread From: Jeff King @ 2008-08-21 20:18 UTC (permalink / raw) To: H. Peter Anvin Cc: Avery Pennarun, Peter Valdemar Mørch (Lists), flucifredi, Git ML On Thu, Aug 21, 2008 at 01:14:41PM -0700, H. Peter Anvin wrote: >> Ah, OK. My problem was that the pages actually need to be named "am.git", >> etc. But with 'git' in the section field, "man git am" does work. >> Unfortunately, it seems to break "man git". :( > > Yeah, that pretty much makes it not a general solution. Oh, sorry, this was just me being incompetent. I was testing with MANSECT=git man git am and of course MANSECT=git man git broke because we are no longer looking in section "1". Setting the sections properly (by adding "git" to /etc/manpath.config, or using MANSECT=1:git) and creating a linkfarm in .../man/mangit (with am.git pointing to ../man1/git-am.1) makes both "man git" and "man git am" work fine. The changes to manpath.config make it a bit outside the scope of git's regular install, but maybe this is something distro people would want to do. -Peff ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-21 17:22 ` H. Peter Anvin 2008-08-21 17:38 ` Jeff King @ 2008-08-21 17:52 ` Bert Wesarg 1 sibling, 0 replies; 29+ messages in thread From: Bert Wesarg @ 2008-08-21 17:52 UTC (permalink / raw) To: H. Peter Anvin Cc: Avery Pennarun, "Peter Valdemar Mørch (Lists)", flucifredi, Git ML On Thu, Aug 21, 2008 at 19:22, H. Peter Anvin <hpa@zytor.com> wrote: > Avery Pennarun wrote: >> >> [and I put him back...] >> >> Unfortunately what we don't have is a proposal that would work better. >> Also, changing the behaviour of 'man' wouldn't work on any platform >> other than Linux (presumably), which means the git documentation >> wouldn't be able to rely on that behaviour. >> >> Still, in a perfect world, what *should* man do in such a case? >> Automatically open /usr/man/man1/git/clone.1? >> > > That would probably be the best option, other options are $MANPATH/man1/git\ > clone.1 or $MANPATH/mangit/clone.git (I actually tried that on the > assumption that it might treat "git" as a section; unfortunately, it didn't > work.) It works here. I have to add 'git' to the SECTION list in /etc/manpath.config. Bert > > -hpa ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-21 16:37 ` H. Peter Anvin 2008-08-21 17:07 ` Avery Pennarun @ 2008-08-22 11:37 ` A Large Angry SCM 1 sibling, 0 replies; 29+ messages in thread From: A Large Angry SCM @ 2008-08-22 11:37 UTC (permalink / raw) To: H. Peter Anvin; +Cc: "Peter Valdemar Mørch (Lists)", git H. Peter Anvin wrote: > Peter Valdemar Mørch (Lists) wrote: >> >> Sorry man that behaviour is the way "man" works. See "man man". >> >> $ git clone --help >> or >> $ git help clone >> >> work right? >> >> Peter >> >> P.S: man, there are puns in that... > > I know that that is the way "man" currently works. > > I doubt you find *anyone* who relies on the current behaviour, so I am > suggesting changing man. That's why the man author was on the recipient > list, but you removed it. Actually, the current "man" behavior is very convenient when you want to lookup multiple things. And *I* do use that feature. ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-21 0:11 Suggestion: "man git clone" H. Peter Anvin 2008-08-21 0:25 ` "Peter Valdemar Mørch (Lists)" @ 2008-08-21 21:49 ` Federico Lucifredi 2008-08-21 23:07 ` H. Peter Anvin 2008-09-04 2:22 ` Federico Lucifredi 2008-08-22 11:02 ` Michael J Gruber 2 siblings, 2 replies; 29+ messages in thread From: Federico Lucifredi @ 2008-08-21 21:49 UTC (permalink / raw) To: H. Peter Anvin; +Cc: Git Mailing List 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) - http://www.lucifredi.com ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-21 21:49 ` Federico Lucifredi @ 2008-08-21 23:07 ` H. Peter Anvin 2008-08-22 0:07 ` Federico Lucifredi 2008-09-04 2:22 ` Federico Lucifredi 1 sibling, 1 reply; 29+ messages in thread From: H. Peter Anvin @ 2008-08-21 23:07 UTC (permalink / raw) To: Federico Lucifredi; +Cc: Git Mailing List 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... > One option would be to support "man foo bar" showing the page labelled foo-bar. That way you'd get at least a modicum of bass-ackwards compatibility. However, at some point we have to be willing to do things other platforms won't, or we'll never do anything new... -hpa ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-21 23:07 ` H. Peter Anvin @ 2008-08-22 0:07 ` Federico Lucifredi 2008-08-22 0:40 ` Jeff King 0 siblings, 1 reply; 29+ messages in thread From: Federico Lucifredi @ 2008-08-22 0:07 UTC (permalink / raw) To: H. Peter Anvin; +Cc: Git Mailing List H. Peter Anvin wrote: > Federico Lucifredi wrote: [...] >> I am open to ideas, but so far the two options above are better than >> anything else that has been so far suggested... >> > > One option would be to support "man foo bar" showing the page labelled > foo-bar. That way you'd get at least a modicum of bass-ackwards > compatibility. I am all for bass-ackwards compatibility, and I think the suggestion of going on "man foo bar" : 1) look for foo-bar; if success, terminate search 2) look for foo 3) look for bar .... may be acceptable - I don't see drawbacks at a first glance, and it would allow for groups of pages to be meaningful. Are you willing to put your patch where your mouth is? :-) Best -F > > However, at some point we have to be willing to do things other > platforms won't, or we'll never do anything new... > > -hpa -- _________________________________________ -- "'Problem' is a bleak word for challenge" - Richard Fish (Federico L. Lucifredi) - flucifredi@acm.org ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-22 0:07 ` Federico Lucifredi @ 2008-08-22 0:40 ` Jeff King 2008-08-22 0:42 ` Jeff King ` (2 more replies) 0 siblings, 3 replies; 29+ messages in thread From: Jeff King @ 2008-08-22 0:40 UTC (permalink / raw) To: Federico Lucifredi; +Cc: H. Peter Anvin, Git Mailing List On Thu, Aug 21, 2008 at 08:07:56PM -0400, Federico Lucifredi wrote: > I am all for bass-ackwards compatibility, and I think the suggestion of > going on "man foo bar" : > > 1) look for foo-bar; if success, terminate search > 2) look for foo > 3) look for bar > .... > > may be acceptable - I don't see drawbacks at a first glance, and it would > allow for groups of pages to be meaningful. Well, the drawback is that there exist X-Y such that X and Y both have manpages (e.g., cvs-debc on my debian box). So we are assuming that the risk is acceptably low of somebody asking for "man X Y", wanting two manpages, and that X and Y fit this pattern. Personally I have never ever wanted to see two manpages from one man invocation, so I have no real problem with that assumption. > Are you willing to put your patch where your mouth is? :-) I've never looked at man code before, but there seem to be at least two man packages for Linux. My boxes have man-db 2.5.2. -Peff ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-22 0:40 ` Jeff King @ 2008-08-22 0:42 ` Jeff King 2008-08-22 1:15 ` Miklos Vajna 2008-08-22 1:19 ` Federico Lucifredi 2 siblings, 0 replies; 29+ messages in thread From: Jeff King @ 2008-08-22 0:42 UTC (permalink / raw) To: Federico Lucifredi; +Cc: H. Peter Anvin, Git Mailing List On Thu, Aug 21, 2008 at 08:40:52PM -0400, Jeff King wrote: > Well, the drawback is that there exist X-Y such that X and Y both have > manpages (e.g., cvs-debc on my debian box). So we are assuming that the Re-reading this, it may not be clear what I meant. I mean there exists a _manpage_ "X-Y" such that "X" and "Y" are also manpages. So on my system there are three commands, each with a manpage: cvs, debc, and cvs-debc. -Peff ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-22 0:40 ` Jeff King 2008-08-22 0:42 ` Jeff King @ 2008-08-22 1:15 ` Miklos Vajna 2008-08-22 1:21 ` Jeff King 2008-08-22 1:21 ` Federico Lucifredi 2008-08-22 1:19 ` Federico Lucifredi 2 siblings, 2 replies; 29+ messages in thread From: Miklos Vajna @ 2008-08-22 1:15 UTC (permalink / raw) To: Jeff King; +Cc: Federico Lucifredi, H. Peter Anvin, Git Mailing List [-- Attachment #1: Type: text/plain, Size: 321 bytes --] On Thu, Aug 21, 2008 at 08:40:52PM -0400, Jeff King <peff@peff.net> wrote: > I've never looked at man code before, but there seem to be at least two > man packages for Linux. My boxes have man-db 2.5.2. Obviously that's not the one Federico maintains. ;-) See http://primates.ximian.com/~flucifredi/man/, it's at 1.6f. [-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-22 1:15 ` Miklos Vajna @ 2008-08-22 1:21 ` Jeff King 2008-08-22 1:21 ` Federico Lucifredi 1 sibling, 0 replies; 29+ messages in thread From: Jeff King @ 2008-08-22 1:21 UTC (permalink / raw) To: Miklos Vajna; +Cc: Federico Lucifredi, H. Peter Anvin, Git Mailing List On Fri, Aug 22, 2008 at 03:15:15AM +0200, Miklos Vajna wrote: > On Thu, Aug 21, 2008 at 08:40:52PM -0400, Jeff King <peff@peff.net> wrote: > > I've never looked at man code before, but there seem to be at least two > > man packages for Linux. My boxes have man-db 2.5.2. > > Obviously that's not the one Federico maintains. ;-) > > See http://primates.ximian.com/~flucifredi/man/, it's at 1.6f. Right. What I meant was two-fold: 1. "I am not going to take your patch challenge, because I don't even seem to be running your man pager." 2. It has been noted in this thread that this will only affect Linux. But it is even worse; it will only affect some distributions. So people need to get several implementations to agree. -Peff ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-22 1:15 ` Miklos Vajna 2008-08-22 1:21 ` Jeff King @ 2008-08-22 1:21 ` Federico Lucifredi 1 sibling, 0 replies; 29+ messages in thread From: Federico Lucifredi @ 2008-08-22 1:21 UTC (permalink / raw) To: Miklos Vajna; +Cc: Jeff King, H. Peter Anvin, Git Mailing List Miklos Vajna wrote: > On Thu, Aug 21, 2008 at 08:40:52PM -0400, Jeff King <peff@peff.net> wrote: >> I've never looked at man code before, but there seem to be at least two >> man packages for Linux. My boxes have man-db 2.5.2. > > Obviously that's not the one Federico maintains. ;-) > > See http://primates.ximian.com/~flucifredi/man/, it's at 1.6f. Indeed. man-db has a higher numbering than man, which sometimes reduces confusion, and sometimes increases it. Best -F -- _________________________________________ -- "'Problem' is a bleak word for challenge" - Richard Fish (Federico L. Lucifredi) - flucifredi@acm.org ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-22 0:40 ` Jeff King 2008-08-22 0:42 ` Jeff King 2008-08-22 1:15 ` Miklos Vajna @ 2008-08-22 1:19 ` Federico Lucifredi 2009-06-28 2:34 ` Colin Watson 2 siblings, 1 reply; 29+ messages in thread From: Federico Lucifredi @ 2008-08-22 1:19 UTC (permalink / raw) To: Jeff King; +Cc: H. Peter Anvin, Git Mailing List Jeff King wrote: > On Thu, Aug 21, 2008 at 08:07:56PM -0400, Federico Lucifredi wrote: > >> I am all for bass-ackwards compatibility, and I think the suggestion of >> going on "man foo bar" : >> >> 1) look for foo-bar; if success, terminate search >> 2) look for foo >> 3) look for bar >> .... >> >> may be acceptable - I don't see drawbacks at a first glance, and it would >> allow for groups of pages to be meaningful. > > Well, the drawback is that there exist X-Y such that X and Y both have > manpages (e.g., cvs-debc on my debian box). So we are assuming that the > risk is acceptably low of somebody asking for "man X Y", wanting two > manpages, and that X and Y fit this pattern. > That's right. > Personally I have never ever wanted to see two manpages from one man > invocation, so I have no real problem with that assumption. > I expected as much, and we should have an option to disable the "new" behavior as a safety anyway. >> Are you willing to put your patch where your mouth is? :-) > > I've never looked at man code before, but there seem to be at least two > man packages for Linux. My boxes have man-db 2.5.2. There are two man packages for linux, man and man-db, the latter being a 90's fork that uses Berkeley DB as a backend to speedup man -k searches (it helped back then). Best -F -- _________________________________________ -- "'Problem' is a bleak word for challenge" - Richard Fish (Federico L. Lucifredi) - flucifredi@acm.org ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-22 1:19 ` Federico Lucifredi @ 2009-06-28 2:34 ` Colin Watson 2009-07-06 2:48 ` Federico Lucifredi 2009-07-06 4:11 ` Federico Lucifredi 0 siblings, 2 replies; 29+ messages in thread From: Colin Watson @ 2009-06-28 2:34 UTC (permalink / raw) To: Federico Lucifredi; +Cc: Jeff King, H. Peter Anvin, Git Mailing List (Sorry I didn't see this until now. HPA only CCed the maintainer of one of the two man packages popular on Linux-based systems; I'm the other one. I happened to find this thread while searching for something else.) In article <48AE143C.8030704@acm.org>, Federico Lucifredi wrote: >Jeff King wrote: >> On Thu, Aug 21, 2008 at 08:07:56PM -0400, Federico Lucifredi wrote: >>> I am all for bass-ackwards compatibility, and I think the suggestion of >>> going on "man foo bar" : >>> >>> 1) look for foo-bar; if success, terminate search >>> 2) look for foo >>> 3) look for bar >>> .... >>> >>> may be acceptable - I don't see drawbacks at a first glance, and it would >>> allow for groups of pages to be meaningful. I think this is a sensible enough compromise, especially given an option to disable it. The code would be a little ugly, but *shrug* not that bad. The extra stat is cheap enough. Using a plain 'git' section for this in order to provoke the happenstance of 'man git clone' working is definitely wrong as far as the manual page hierarchy goes; it means that things like searching for just user commands (section 1) that contain some term will fail. Putting them in section '1git' (i.e. section 1 with a git "extension") would be more in line with how manual pages are typically laid out, and at least with man-db would not require any configuration file changes. However, I think both of these are suboptimal. Section extensions are typically used for things like functions or modules in other programming languages, or sometimes for cases where file names would otherwise clash. I'm not much of a git user myself, but I don't get the impression that most git users think of 'git clone' as analogous to a 'clone' command in a hypothetical 'git' programming language; it's closer to an ordinary user command. The only case where I've seen subcommands given their own unprefixed manual pages with only the section extension to tell them apart is OpenSSL, with pages like x509(1ssl). IME, this is very confusing and not a good example to follow: firstly, you can't trivially find a list of all the subcommands with something like 'apropos openssl-'; secondly, it's easy to miss that you're dealing with an openssl subcommand unless you keep your eyes peeled. Short of some mechanism for git to provide a plug-in to man to tell it where to find subpages (eek! potential overengineering alert!), a foo-bar lookup seems tolerable enough. >> Personally I have never ever wanted to see two manpages from one man >> invocation, so I have no real problem with that assumption. > >I expected as much, and we should have an option to disable the "new" >behavior as a safety anyway. Would you like to suggest an option name for this, so that we can avoid unnecessary divergence? Perhaps something like --separate? >>> Are you willing to put your patch where your mouth is? :-) >> >> I've never looked at man code before, but there seem to be at least two >> man packages for Linux. My boxes have man-db 2.5.2. > >There are two man packages for linux, man and man-db, the latter being a >90's fork that uses Berkeley DB as a backend to speedup man -k searches >(it helped back then). (I hope git@ will excuse the digression.) Don't be confused by the name. Once upon a time the main feature of man-db was indeed its database; these days that's almost one of the least interesting features as far as I'm concerned (and I recommend GDBM for the database layer nowadays anyway, since Berkeley DB is overkill and has gone through an annoying number of disk format changes). These days, much more relevant are things like the fact that man-db can handle encodings properly (both in manual pages and its own translated messages; *why* does man still use catgets?), and the effort put into process glue libraries so that it doesn't have to be audited carefully for unsafe shell code and so that it can be a lot more efficient when processing large numbers of manual pages (e.g. man -K). Anyway, if you look at the history, what happened is that John W. Eaton wrote the original man way back in 1990/1 or so, then two different sets of people developed it in different directions into man and man-db. That was in the early 1990s when free software developers weren't communicating as often as they do now. Then, by the time it became obvious around 1995 that there'd been a fork, the two were already separate packages with different aims and it was now too hard for anyone to merge them. You could still see the common ancestry if you looked closely (indeed, you still can in places), but they're really much more like two completely separate implementations than a fork. It's a bit of a shame in some ways, but harmless enough. Cheers, -- Colin Watson [cjwatson@debian.org] ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2009-06-28 2:34 ` Colin Watson @ 2009-07-06 2:48 ` Federico Lucifredi 2009-07-06 4:11 ` Federico Lucifredi 1 sibling, 0 replies; 29+ messages in thread From: Federico Lucifredi @ 2009-07-06 2:48 UTC (permalink / raw) To: Colin Watson; +Cc: Jeff King, H. Peter Anvin, Git Mailing List Colin Watson wrote: > (Sorry I didn't see this until now. HPA only CCed the maintainer of one > of the two man packages popular on Linux-based systems; I'm the other > one. I happened to find this thread while searching for something else.) > Really? Sorry, I thought I had added you. My bad. > In article <48AE143C.8030704@acm.org>, Federico Lucifredi wrote: >> Jeff King wrote: >>> On Thu, Aug 21, 2008 at 08:07:56PM -0400, Federico Lucifredi wrote: >>>> I am all for bass-ackwards compatibility, and I think the suggestion of >>>> going on "man foo bar" : >>>> >>>> 1) look for foo-bar; if success, terminate search >>>> 2) look for foo >>>> 3) look for bar >>>> .... >>>> >>>> may be acceptable - I don't see drawbacks at a first glance, and it would >>>> allow for groups of pages to be meaningful. > > I think this is a sensible enough compromise, especially given an option > to disable it. The code would be a little ugly, but *shrug* not that > bad. The extra stat is cheap enough. > Sounds good to me :) > Using a plain 'git' section for this in order to provoke the > happenstance of 'man git clone' working is definitely wrong as far as > the manual page hierarchy goes; it means that things like searching for > just user commands (section 1) that contain some term will fail. Putting > them in section '1git' (i.e. section 1 with a git "extension") would be > more in line with how manual pages are typically laid out, and at least > with man-db would not require any configuration file changes. However, I > think both of these are suboptimal. Section extensions are typically > used for things like functions or modules in other programming > languages, or sometimes for cases where file names would otherwise > clash. I'm not much of a git user myself, but I don't get the impression > that most git users think of 'git clone' as analogous to a 'clone' > command in a hypothetical 'git' programming language; it's closer to an > ordinary user command. > > The only case where I've seen subcommands given their own unprefixed > manual pages with only the section extension to tell them apart is > OpenSSL, with pages like x509(1ssl). IME, this is very confusing and not > a good example to follow: firstly, you can't trivially find a list of > all the subcommands with something like 'apropos openssl-'; secondly, > it's easy to miss that you're dealing with an openssl subcommand unless > you keep your eyes peeled. > > Short of some mechanism for git to provide a plug-in to man to tell it > where to find subpages (eek! potential overengineering alert!), a > foo-bar lookup seems tolerable enough. > >>> Personally I have never ever wanted to see two manpages from one man >>> invocation, so I have no real problem with that assumption. >> I expected as much, and we should have an option to disable the "new" >> behavior as a safety anyway. > > Would you like to suggest an option name for this, so that we can avoid > unnecessary divergence? Perhaps something like --separate? the option to trigger "classic" behavior? How about --no-subpages? > >>>> Are you willing to put your patch where your mouth is? :-) >>> I've never looked at man code before, but there seem to be at least two >>> man packages for Linux. My boxes have man-db 2.5.2. >> There are two man packages for linux, man and man-db, the latter being a >> 90's fork that uses Berkeley DB as a backend to speedup man -k searches >> (it helped back then). > > (I hope git@ will excuse the digression.) > > Don't be confused by the name. Once upon a time the main feature of > man-db was indeed its database; these days that's almost one of the [snip] I am sorry Colin, I did not mean to say anything bad, just that there are two packages, and as you said... there are differences but nothing major. I don't think we want to discuss "my package > yours" here (although I can of course provide arguments for mine!). Are you Git guys still interested in this? I actually have recently worked on a project where we labeled man pages for subcommands with this convention, so I would welcome the extension for neatness. Best -F -- _________________________________________ -- "'Problem' is a bleak word for challenge" - Richard Fish (Federico L. Lucifredi) - flucifredi@acm.org - GnuPG 0x4A73884C ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2009-06-28 2:34 ` Colin Watson 2009-07-06 2:48 ` Federico Lucifredi @ 2009-07-06 4:11 ` Federico Lucifredi 1 sibling, 0 replies; 29+ messages in thread From: Federico Lucifredi @ 2009-07-06 4:11 UTC (permalink / raw) To: Colin Watson; +Cc: Jeff King, H. Peter Anvin, Git Mailing List Colin Watson wrote: > (Sorry I didn't see this until now. HPA only CCed the maintainer of one > of the two man packages popular on Linux-based systems; I'm the other > one. I happened to find this thread while searching for something else.) > Really? Sorry, I thought I had added you. My bad. > In article <48AE143C.8030704@acm.org>, Federico Lucifredi wrote: >> Jeff King wrote: >>> On Thu, Aug 21, 2008 at 08:07:56PM -0400, Federico Lucifredi wrote: >>>> I am all for bass-ackwards compatibility, and I think the suggestion of >>>> going on "man foo bar" : >>>> >>>> 1) look for foo-bar; if success, terminate search >>>> 2) look for foo >>>> 3) look for bar >>>> .... >>>> >>>> may be acceptable - I don't see drawbacks at a first glance, and it would >>>> allow for groups of pages to be meaningful. > > I think this is a sensible enough compromise, especially given an option > to disable it. The code would be a little ugly, but *shrug* not that > bad. The extra stat is cheap enough. > Sounds good to me :) > Using a plain 'git' section for this in order to provoke the > happenstance of 'man git clone' working is definitely wrong as far as > the manual page hierarchy goes; it means that things like searching for > just user commands (section 1) that contain some term will fail. Putting > them in section '1git' (i.e. section 1 with a git "extension") would be > more in line with how manual pages are typically laid out, and at least > with man-db would not require any configuration file changes. However, I > think both of these are suboptimal. Section extensions are typically > used for things like functions or modules in other programming > languages, or sometimes for cases where file names would otherwise > clash. I'm not much of a git user myself, but I don't get the impression > that most git users think of 'git clone' as analogous to a 'clone' > command in a hypothetical 'git' programming language; it's closer to an > ordinary user command. > > The only case where I've seen subcommands given their own unprefixed > manual pages with only the section extension to tell them apart is > OpenSSL, with pages like x509(1ssl). IME, this is very confusing and not > a good example to follow: firstly, you can't trivially find a list of > all the subcommands with something like 'apropos openssl-'; secondly, > it's easy to miss that you're dealing with an openssl subcommand unless > you keep your eyes peeled. > > Short of some mechanism for git to provide a plug-in to man to tell it > where to find subpages (eek! potential overengineering alert!), a > foo-bar lookup seems tolerable enough. > >>> Personally I have never ever wanted to see two manpages from one man >>> invocation, so I have no real problem with that assumption. >> I expected as much, and we should have an option to disable the "new" >> behavior as a safety anyway. > > Would you like to suggest an option name for this, so that we can avoid > unnecessary divergence? Perhaps something like --separate? the option to trigger "classic" behavior? How about --no-subpages? > >>>> Are you willing to put your patch where your mouth is? :-) >>> I've never looked at man code before, but there seem to be at least two >>> man packages for Linux. My boxes have man-db 2.5.2. >> There are two man packages for linux, man and man-db, the latter being a >> 90's fork that uses Berkeley DB as a backend to speedup man -k searches >> (it helped back then). > > (I hope git@ will excuse the digression.) > > Don't be confused by the name. Once upon a time the main feature of > man-db was indeed its database; these days that's almost one of the [snip] I am sorry Colin, I did not mean to say anything bad, just that there are two packages, and as you said... there are differences but nothing major. I don't think we want to discuss "my package > yours" here (although I can of course provide arguments for mine!). Are you Git guys still interested in this? I actually have recently worked on a project where we labeled man pages for subcommands with this convention, so I would welcome the extension for neatness. Best -F -- _________________________________________ -- "'Problem' is a bleak word for challenge" - Richard Fish (Federico L. Lucifredi) - flucifredi@acm.org - GnuPG 0x4A73884C ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-21 21:49 ` Federico Lucifredi 2008-08-21 23:07 ` H. Peter Anvin @ 2008-09-04 2:22 ` Federico Lucifredi 2008-09-04 3:31 ` H. Peter Anvin 1 sibling, 1 reply; 29+ messages in thread From: Federico Lucifredi @ 2008-09-04 2:22 UTC (permalink / raw) To: H. Peter Anvin; +Cc: Git Mailing List 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@acm.org ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-09-04 2:22 ` Federico Lucifredi @ 2008-09-04 3:31 ` H. Peter Anvin 0 siblings, 0 replies; 29+ messages in thread From: H. Peter Anvin @ 2008-09-04 3:31 UTC (permalink / raw) To: Federico Lucifredi; +Cc: Git Mailing List Federico Lucifredi wrote: > 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. > That's just as bad as "man git-clone". Arguably worse. -hpa ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-21 0:11 Suggestion: "man git clone" H. Peter Anvin 2008-08-21 0:25 ` "Peter Valdemar Mørch (Lists)" 2008-08-21 21:49 ` Federico Lucifredi @ 2008-08-22 11:02 ` Michael J Gruber 2008-08-22 15:03 ` Derek Fawcus ` (2 more replies) 2 siblings, 3 replies; 29+ messages in thread From: Michael J Gruber @ 2008-08-22 11:02 UTC (permalink / raw) To: git H. Peter Anvin venit, vidit, dixit 21.08.2008 02:11: > 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... The discussion seems to show that altering man and relying on the new behaviour is no option, and neither is playing games with man's section options. How about: - Change all references inside git (warnings etc) from "man git-bla" to "git help bla". - Change all references in the help pages (gitlinks) accordingly. - Put a warning in the main git man page which redirects the confused ("If you were looking for the manpage of "git bla" and issued "man git bla", please refer to "man git-bla" or "git help bla".'), maybe just before the command list there. This could be supported by an alias mapping "git man" to "git help -m". I've heard about some other SCMs which have only "scm help bla", so this suggestion would be in-line with common usage. [Not that git would have to learn from other SCM's ;) ] Michael ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-22 11:02 ` Michael J Gruber @ 2008-08-22 15:03 ` Derek Fawcus 2008-08-22 15:53 ` Mikael Magnusson 2008-08-25 12:38 ` Matthieu Moy 2 siblings, 0 replies; 29+ messages in thread From: Derek Fawcus @ 2008-08-22 15:03 UTC (permalink / raw) To: git On Fri, Aug 22, 2008 at 01:02:57PM +0200, Michael J Gruber wrote: > I've heard about some other SCMs which have only "scm help bla", so this > suggestion would be in-line with common usage. [Not that git would have > to learn from other SCM's ;) ] Clearcase - commands such as 'cleartool describe', man page in ct+describe.1 Has 'cleartool help describe' (and 'cleartool describe -help') which gives a usage summary, and 'cleartool man describe' (or 'man ct+describe') for the man page. So basically the same solution, but a slightly different choice/use for keywords. (and if one has an alias 'ct=cleartool', it seems to make more sense). DF ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-22 11:02 ` Michael J Gruber 2008-08-22 15:03 ` Derek Fawcus @ 2008-08-22 15:53 ` Mikael Magnusson 2008-08-25 12:38 ` Matthieu Moy 2 siblings, 0 replies; 29+ messages in thread From: Mikael Magnusson @ 2008-08-22 15:53 UTC (permalink / raw) To: Michael J Gruber; +Cc: git 2008/8/22 Michael J Gruber <michaeljgruber+gmane@fastmail.fm>: > H. Peter Anvin venit, vidit, dixit 21.08.2008 02:11: >> 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... > > The discussion seems to show that altering man and relying on the new > behaviour is no option, and neither is playing games with man's section > options. > > How about: > > - Change all references in the help pages (gitlinks) accordingly. I think that would break navigating man pages in any man reader... Most of them detect and handle "foo(N)" magically and let you click on it. -- Mikael Magnusson ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Suggestion: "man git clone" 2008-08-22 11:02 ` Michael J Gruber 2008-08-22 15:03 ` Derek Fawcus 2008-08-22 15:53 ` Mikael Magnusson @ 2008-08-25 12:38 ` Matthieu Moy 2 siblings, 0 replies; 29+ messages in thread From: Matthieu Moy @ 2008-08-25 12:38 UTC (permalink / raw) To: Michael J Gruber; +Cc: git Michael J Gruber <michaeljgruber+gmane@fastmail.fm> writes: > I've heard about some other SCMs which have only "scm help bla", so this > suggestion would be in-line with common usage. [Not that git would have > to learn from other SCM's ;) ] OTOH, I like the fact that the manpages be browsable with man. As an Emacs user, I often do M-x man RET git-whatever RET, other people can enjoy their favorite man reader. If git starts hiding that "man" stuff to the user, (s)he may just fail to notice that it is possible. -- Matthieu ^ permalink raw reply [flat|nested] 29+ messages in thread
end of thread, other threads:[~2009-07-06 4:11 UTC | newest] Thread overview: 29+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-08-21 0:11 Suggestion: "man git clone" H. Peter Anvin 2008-08-21 0:25 ` "Peter Valdemar Mørch (Lists)" 2008-08-21 16:37 ` H. Peter Anvin 2008-08-21 17:07 ` Avery Pennarun 2008-08-21 17:22 ` H. Peter Anvin 2008-08-21 17:38 ` Jeff King 2008-08-21 20:13 ` Jeff King 2008-08-21 20:14 ` H. Peter Anvin 2008-08-21 20:18 ` Jeff King 2008-08-21 17:52 ` Bert Wesarg 2008-08-22 11:37 ` A Large Angry SCM 2008-08-21 21:49 ` Federico Lucifredi 2008-08-21 23:07 ` H. Peter Anvin 2008-08-22 0:07 ` Federico Lucifredi 2008-08-22 0:40 ` Jeff King 2008-08-22 0:42 ` Jeff King 2008-08-22 1:15 ` Miklos Vajna 2008-08-22 1:21 ` Jeff King 2008-08-22 1:21 ` Federico Lucifredi 2008-08-22 1:19 ` Federico Lucifredi 2009-06-28 2:34 ` Colin Watson 2009-07-06 2:48 ` Federico Lucifredi 2009-07-06 4:11 ` Federico Lucifredi 2008-09-04 2:22 ` Federico Lucifredi 2008-09-04 3:31 ` H. Peter Anvin 2008-08-22 11:02 ` Michael J Gruber 2008-08-22 15:03 ` Derek Fawcus 2008-08-22 15:53 ` Mikael Magnusson 2008-08-25 12:38 ` Matthieu Moy
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).