On 2007-11-12, Joerg van den Hoff <[EMAIL PROTECTED]> wrote: > don't know if it helps, but `man -d ion3' shows the actual > command which is executed when you call `man ion3': > > (cd /opt/local/share/man && /usr/bin/gunzip -c > '/opt/local/share/man/man1/ion3.1.gz' | /usr/bin/tbl | /usr/bin/groff > -Wall -mtty-char -Tascii -mandoc -c | less -fR) > > is'nt this sufficient for your purpose?
Seems rather complicated to make any use of that, as the command line could be anything, Ion's man pages arent't gzipped by default, and so on. On the FC4 system at work I get for `man ls` (cd /usr/share/man && (echo ".ll 8.1i"; echo ".nr LL 8.1i"; echo ".pl 1100i"; /usr/bin/gunzip -c '/usr/share/man/man1/ls.1.gz'; echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/gtbl | /usr/bin/nroff -c --legacy ISO-8859-1 -mandoc 2>/dev/null | /usr/bin/less -is) which is quite a bit more complicated. And anyway, in the end it's not really what I'm after: `man ion3` should work directly, at least in the environment that Ion is running in. Ben Hutchings already suggested that -M has been around quite long (although it probably also isn't standard). However, the problem is that it overrides all of manpath, and there's no portable way to get the standard manual path to append to. Of course, the ZeroInstall build is unfortunately just for Linux ATM, where the `mathpath` command is quite standard (and in fact the man page completion feature uses it, if available and MANPATH isn't set). But I'd still like to have a cleaner solution.. It's unfortunate that ZeroInstall doesn't AFAIK let you set/append environment variables based on the location of the package in question, only dependencies. This way it could just handle all those crummy details, and use a sane default setting. Likewise, programs wouldn't have to use $0 to figure out their location, but could take it from the environment. Of course, setting a complete MANPATH sucks when there's `manpath`, and `man` should really support extra paths or databases instead of total overrides... An extra 0man wrapper (aliased to man in the shell) could of course do stuff like that. But it's again not something that Ion should provide. -- Tuomo
