1 |
Hi gang. |
2 |
|
3 |
(This problem is with the .so directive in man files which includes other |
4 |
man |
5 |
files into the current document, much like #include in C; if the included |
6 |
file |
7 |
is gzipped, man breaks down. Check man zshall (zsh) for example). |
8 |
|
9 |
As far as I can see, nobody else has figured this one out yet, so I did a |
10 |
little digging today. I didn't resolve the problem, but here are my |
11 |
findings: |
12 |
|
13 |
) An example .so directive: |
14 |
.so man1/zshftp.1 |
15 |
|
16 |
) The .so directive is by default interpreted by troff, not any external |
17 |
program. |
18 |
In the above case, troff does not find zshftp.1 (since it's only available |
19 |
as zshftp.1.gz), and an error is printed to stderr. |
20 |
|
21 |
) We can replace .so with .pso, which will allow us to use zcat, thus: |
22 |
.pso zcat $MANDIR/man1/zshftp.1.gz |
23 |
but this has two problems. First off, troff is by default running in safe |
24 |
mode, and will not invoke any untrusted external programs, such as zcat; |
25 |
this can be turned off with the -U switch to troff, but I don't like that. |
26 |
Secondly, $MANDIR isn't really one directory, it is many, so we'd have |
27 |
write a script that traverses the manpath to find the proper |
28 |
man1/zshftp.1.gz file. |
29 |
|
30 |
) I have not had the chance to see how this is resolved in other distros. |
31 |
I would assume they either have enabled some configure option to troff, or |
32 |
that they don't package all their man files. |
33 |
|
34 |
) Current workaround; unpack all man files that are includees. Includers |
35 |
do not need to be unpacked. |
36 |
|
37 |
|
38 |
I will look into the configure switches for man once I get net access |
39 |
working again. |
40 |
|
41 |
|
42 |
Kind regards, |
43 |
|
44 |
Karl T |