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. > To eliminate duplicates, realpath() isn't really nessary; just caching the > results of stat() on the directory should be sufficient. 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. 1. http://mail.opensolaris.org/pipermail/opensolaris-code/2007-November/006393.html > One additional consideration is potentially the behaviour of > > PATH=/usr/ucb:/usr/bin > > vs > > PATH=/usr/bin:/usr/ucb > > I'd like to get the proper "ps" manual page in both cases. Now we are trampling on man.cf, which does tend to exist. > Come to think of it, it would also be nice to be able to say: > > man /usr/bin/ps I've long wanted this. Aside from the /usr/bin vs. /usr/ucb issue, this would be very straightforward to do. > 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 would involve possibly overriding the behavior configured by man.cf. Since *Solaris ships with /usr/share/man/man.cf adding this functionality only in the absence of man.cf would be pointless. Overriding the behavior configured by man.cf just because MANPATH is not set seems like a confusing configuration option. When taking it to this granularity, there are other things to consider at the same time. For instance, Should it also translate gnu info pages into man pages and display them when appropriate? 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. -- Mike Gerdts http://mgerdts.blogspot.com/ _______________________________________________ opensolaris-code mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
