Re: [osol-code] Rethinking MANPATH

2007-11-27 Thread Richard L. Hamilton
[...] > >I think that this work sounds like good follow-on > work. If others > >feel strongly that /usr/ucb and/or gnu info handling > belongs with this > >and is unlikely to derail the ARC case I could look > to lump it in. > > I don't think it's a requirement; it does not pass > the test of > "

Re: [osol-code] Rethinking MANPATH

2007-11-26 Thread Mike Gerdts
On Nov 26, 2007 9:10 AM, James Carlson <[EMAIL PROTECTED]> wrote: > Mike Gerdts writes: > > > and have this expand to something akin to: > > > > > > man -M /usr/bin/../share/man ps > > > > > > (again, tricky for /usr/ucb which needs to be special cased, if we > > > actually > > > care abou

Re: [osol-code] Rethinking MANPATH

2007-11-26 Thread James Carlson
Mike Gerdts writes: > > and have this expand to something akin to: > > > > man -M /usr/bin/../share/man ps > > > > (again, tricky for /usr/ucb which needs to be special cased, if we actually > > care about that as the man behaviour is currently broken in that case > > anyway) > > This woul

Re: [osol-code] Rethinking MANPATH

2007-11-26 Thread Casper . Dik
>I had considered that as well. However, you advised[1] the use of >realpath. As an afterthought using realpath() also has the side >effect of making the output of man -l more user-friendly as well as >making error messages that complain about windex missing more >sensible. Ah, that just depend

Re: [osol-code] Rethinking MANPATH

2007-11-26 Thread Mike Gerdts
On Nov 26, 2007 4:43 AM, <[EMAIL PROTECTED]> wrote: > As implementation note I would suggest that the MANPATH is searched while > it is constructed, not constructed first completely and then searched. I can take a look at that approach to see how involved it gets. I'll get back to you on this.

Re: [osol-code] Rethinking MANPATH

2007-11-26 Thread Casper . Dik
>Mike Gerdts wrote: >> Based up feedback I received over the past few weeks, I have written >> the code to do the following: >> >> - If MANPATH is set, it is used (no change in behavior) >> >> - If MANPATH is not set, construct a MANPATH based upon PATH using the >> following rules: >> >> -

Re: [osol-code] Rethinking MANPATH

2007-11-26 Thread Darren J Moffat
Mike Gerdts wrote: > Based up feedback I received over the past few weeks, I have written > the code to do the following: > > - If MANPATH is set, it is used (no change in behavior) > > - If MANPATH is not set, construct a MANPATH based upon PATH using the > following rules: > > - For each P

Re: [osol-code] Rethinking MANPATH

2007-11-21 Thread Mike Gerdts
On Nov 4, 2007 7:11 PM, Mike Gerdts <[EMAIL PROTECTED]> wrote: > Everyone seems to have their favorite order for PATH. People seldom > seem to remember to make the corresponding changes to MANPATH. [snip] > This would have the effect of making the default path searched by man > to simply follow

Re: [osol-code] Rethinking MANPATH

2007-11-07 Thread Peter Memishian
> You can add section numbers (separated by commas) in the MANPATH > variable. These are searched before the sections specified in man.cf. Though if you use them you may end up tripping over bugs like 6483933: $ MANPATH=/usr/man:/usr/dt/man $ time dtsearchpath > /dev/null real0m0.0

Re: [osol-code] Rethinking MANPATH

2007-11-07 Thread James Carlson
Peter Memishian writes: > > You can add section numbers (separated by commas) in the MANPATH > > variable. These are searched before the sections specified in man.cf. > > Though if you use them you may end up tripping over bugs like 6483933: Ouch. -- James Carlson, Solaris Networking

Re: [osol-code] Rethinking MANPATH

2007-11-07 Thread James Carlson
Richard L. Hamilton writes: > I don't find any reference in the man source to MANEXT; perhaps > you mean the MANSECTS setting in a man.cf file? AFAIK, there's no > comparable environment variable; I wish there were, it would allow You can add section numbers (separated by commas) in the MANPATH v

Re: [osol-code] Rethinking MANPATH

2007-11-07 Thread Richard L. Hamilton
[...] > >That's pretty much what I did for my own version of > this; > >all the pathnames of commands that I knew had man > pages in > >/usr/[share]/man ( /usr/bin, /sbin, /usr/sbin, > /usr/ucb) were > >mapped to /usr/share/man; all others used a derived > name > >(with share/man tried first, then

Re: [osol-code] Rethinking MANPATH

2007-11-06 Thread timeless
On 05/11/2007, Mike Gerdts <[EMAIL PROTECTED]> wrote: > True enough. But if I find that I can't get ls to behave properly and > do "man ls" it would be really handy for that stub of a man page to > redirect me to info. This could be a person's first hint that their > PATH isn't what they were exp

Re: [osol-code] Rethinking MANPATH

2007-11-06 Thread Joerg Schilling
"Mike Gerdts" <[EMAIL PROTECTED]> wrote: > > > True enough. But if I find that I can't get ls to behave properly and > > > do "man ls" it would be really handy for that stub of a man page to > > > redirect me to info. This could be a person's first hint that their > > > PATH isn't what they were

Re: [osol-code] Rethinking MANPATH

2007-11-06 Thread Mike Gerdts
On 11/6/07, Joerg Schilling <[EMAIL PROTECTED]> wrote: > "Mike Gerdts" <[EMAIL PROTECTED]> wrote: > > > On 11/5/07, Shawn Walker <[EMAIL PROTECTED]> wrote: > > > "man" on GNU/Linux tends to be worthless. "info" is usually the place > > > to find things in my experience. > > > > True enough. But if

Re: [osol-code] Rethinking MANPATH

2007-11-06 Thread Casper . Dik
>[...] >> That is great for components that ship as part of >> OpenSolaris, but >> third parties haven't really bought into the >> share/man idea. I was >> initially going down the route that OpenSolaris has >> symbolic links >> pointing man to share/man. Perhaps the thing to do >> is use share/

Re: [osol-code] Rethinking MANPATH

2007-11-06 Thread Joerg Schilling
"Mike Gerdts" <[EMAIL PROTECTED]> wrote: > On 11/5/07, Shawn Walker <[EMAIL PROTECTED]> wrote: > > "man" on GNU/Linux tends to be worthless. "info" is usually the place > > to find things in my experience. > > True enough. But if I find that I can't get ls to behave properly and > do "man ls" it

Re: [osol-code] Rethinking MANPATH

2007-11-06 Thread Richard L. Hamilton
[...] > That is great for components that ship as part of > OpenSolaris, but > third parties haven't really bought into the > share/man idea. I was > initially going down the route that OpenSolaris has > symbolic links > pointing man to share/man. Perhaps the thing to do > is use share/man > if i

Re: [osol-code] Rethinking MANPATH

2007-11-05 Thread Shawn Walker
On 05/11/2007, Mike Gerdts <[EMAIL PROTECTED]> wrote: > On 11/5/07, Shawn Walker <[EMAIL PROTECTED]> wrote: > > "man" on GNU/Linux tends to be worthless. "info" is usually the place > > to find things in my experience. > > True enough. But if I find that I can't get ls to behave properly and > do

Re: [osol-code] Rethinking MANPATH

2007-11-05 Thread Mike Gerdts
On 11/5/07, Shawn Walker <[EMAIL PROTECTED]> wrote: > "man" on GNU/Linux tends to be worthless. "info" is usually the place > to find things in my experience. True enough. But if I find that I can't get ls to behave properly and do "man ls" it would be really handy for that stub of a man page to

Re: [osol-code] Rethinking MANPATH

2007-11-05 Thread Shawn Walker
On 05/11/2007, John Plocher <[EMAIL PROTECTED]> wrote: > It would be good to know what the various Linux distros do with their man > commands (men?) so that a "man" proposal could take /all/ of their Best > Practices into account, rather than inventing something different or > incomplete... > > We

Re: [osol-code] Rethinking MANPATH

2007-11-05 Thread John Plocher
It would be good to know what the various Linux distros do with their man commands (men?) so that a "man" proposal could take /all/ of their Best Practices into account, rather than inventing something different or incomplete... We've had this man command conversation before at least once in the

Re: [osol-code] Rethinking MANPATH

2007-11-05 Thread Mike Gerdts
On 11/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > >Mike Gerdts wrote: > >> if ( (manpath = getenv("MANPATH")) == NULL ) { > >> if ( (path = getenv("PATH")) != NULL ) { > >> /* for each PATH component > >> *if component ends in /bin or /sbin > >> *

Re: [osol-code] Rethinking MANPATH

2007-11-05 Thread Mike Gerdts
On 11/5/07, Darren J Moffat <[EMAIL PROTECTED]> wrote: > Mike Gerdts wrote: > > Everyone seems to have their favorite order for PATH. People seldom > > seem to remember to make the corresponding changes to MANPATH. > > > > How much resistance would one encounter if the following logic was > > used

Re: [osol-code] Rethinking MANPATH

2007-11-05 Thread Darren J Moffat
Mike Gerdts wrote: > Everyone seems to have their favorite order for PATH. People seldom > seem to remember to make the corresponding changes to MANPATH. > > How much resistance would one encounter if the following logic was > used? Compare to > http://cvs.opensolaris.org/source/xref/onnv/onnv-g

Re: [osol-code] Rethinking MANPATH

2007-11-05 Thread Casper . Dik
>Mike Gerdts wrote: >> if ( (manpath = getenv("MANPATH")) == NULL ) { >> if ( (path = getenv("PATH")) != NULL ) { >> /* for each PATH component >> *if component ends in /bin or /sbin >> *replace bin or sbin with man >> *append to manpath >

Re: [osol-code] Rethinking MANPATH

2007-11-04 Thread Mike Gerdts
On 11/4/07, Stephen Potter <[EMAIL PROTECTED]> wrote: > You'd need to make sure you check that the man part of each component > exists. /man doesn't exist, even though /bin and /sbin do (even if they > are links). I wasn't sure how important that would be. MANPATH could already point to non-exis

Re: [osol-code] Rethinking MANPATH

2007-11-04 Thread Stephen Potter
Mike Gerdts wrote: > if ( (manpath = getenv("MANPATH")) == NULL ) { > if ( (path = getenv("PATH")) != NULL ) { > /* for each PATH component > *if component ends in /bin or /sbin > *replace bin or sbin with man > *append to manpath >

[osol-code] Rethinking MANPATH

2007-11-04 Thread Mike Gerdts
Everyone seems to have their favorite order for PATH. People seldom seem to remember to make the corresponding changes to MANPATH. How much resistance would one encounter if the following logic was used? Compare to http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/man/src/man.c#3