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-gate/usr/src/cmd/man/src/man.c#311. > > 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 > */ > } else { > manpath = MANDIR; > } > }
ARC case 2007/235 attempted to set a better default $MANPATH by other means and it never got approval. This approach however might be slightly less controversial. However your logic has a MAJOR issue that causes a regression. Today MANPATH being unset isn't that unusual, but PATH being unset almost never happens. With your logic there would be a regression since no library man pages would be found, a simple adjustment to either append or prepend MANDIR in the $PATH non null case would help with that. Also it should probably be s@/[EMAIL PROTECTED]/share/man@ rather than s@/bin@/[EMAIL PROTECTED] -- Darren J Moffat _______________________________________________ opensolaris-code mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
