reassign 363250 man
retitle 363250 Please clarify how $PAGER is invoked in the man manpage
stop
Hi,
On Tue, Apr 18, 2006, Rohan Dhruva wrote:
> export PAGER="col -b | view -c 'set ft=man nomod nolist titlestring=MANPAGE' -"
This $PAGER definition makes the assumption that it's passed to sh -c
(you use pipes and quotes). The man manpage doesn't say that $PAGER is
passed to sh -c, it says it will use $PAGER as the program to display
the manual page.
I suggest you use:
export PAGER="sh -c \"col -b | view -c 'set ft=man nomod nolist titlestring=MANPAGE' -\""
That didnt work.
[EMAIL PROTECTED] ~]$ export PAGER="sh -c \"col -b | view -c 'set ft=man nomod nolist titlestring=MANPAGE' -\""
[EMAIL PROTECTED] ~]$ echo $PAGER
sh -c "col -b | view -c 'set ft=man nomod nolist titlestring=MANPAGE' -"
[EMAIL PROTECTED] ~]$ man vim
Reformatting vim(1), please wait...
view: -s option is only applicable to ex.
man: command exited with status 256: /usr/bin/zsoelim /tmp/zmanqn0tzd | /usr/bin/tbl | /usr/bin/nroff -mandoc -rLL=89n -rLT=89n -Tutf8 | sh -c col -b | view -c 'set ft=man nomod nolist titlestring=MANPAGE' -
[EMAIL PROTECTED] ~]$
which explicitely calls sh -c to handle pipes and quotes in the
expected way.
You may also use your own /usr/local/bin/pager with:
#!/bin/sh
col -b | view -c 'set ft=man nomod nolist titlestring=MANPAGE' -
and with PAGER=/usr/local/bin/pager.
I am reassigning to man for the man manpage to be clarified with
respect to the way $PAGER is called.
Which did not work either.
[EMAIL PROTECTED] ~]$ cat /usr/local/bin/vipager
#!/bin/sh
col -b | view -c 'set ft=man nomod nolist titlestring=MANPAGE' -
[EMAIL PROTECTED] ~]$ export PAGER=/usr/local/bin/vipager
[EMAIL PROTECTED] ~]$ echo $PAGER
/usr/local/bin/vipager
[EMAIL PROTECTED] ~]$ man man
Reformatting man(1), please wait...
view: -s option is only applicable to ex.
man: command exited with status 256: /usr/bin/zsoelim /tmp/zmansyaLax | /usr/bin/tbl | /usr/bin/nroff -mandoc -rLL=89n -rLT=89n -Tutf8 | /usr/local/bin/vipager
[EMAIL PROTECTED] ~]$
Thanks for the help, please keep the ideas coming :)
Rohan.
--
Rohan Dhruva
Proud GNU/Linux user.
Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming or what?"
http://www.dhruva.be/