[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge



On 4/18/06, Loïc Minier <lool+debian@via.ecp.fr> wrote:
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.

[rohan@debian ~]$ export PAGER="sh -c \"col -b | view -c 'set ft=man nomod nolist titlestring=MANPAGE' -\""
[rohan@debian ~]$ echo $PAGER
sh -c "col -b | view -c 'set ft=man nomod nolist titlestring=MANPAGE' -"
[rohan@debian ~]$ 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' -
[rohan@debian ~]$

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.
[rohan@debian ~]$ cat /usr/local/bin/vipager
#!/bin/sh

col -b | view -c 'set ft=man nomod nolist titlestring=MANPAGE' -

[rohan@debian ~]$ export PAGER=/usr/local/bin/vipager
[rohan@debian ~]$ echo $PAGER
/usr/local/bin/vipager
[rohan@debian ~]$ 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
[rohan@debian ~]$

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/
Reply to: