[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Escape characters in -man output
From: |
Zvezdan Petkovic |
Subject: |
Re: [Groff] Escape characters in -man output |
Date: |
Thu, 7 Jul 2005 12:34:30 -0400 |
User-agent: |
Mutt/1.4.2i |
On Thu, Jul 07, 2005 at 10:43:40AM +0200, Jörgen Grahn wrote:
> The -c option mentioned is an option to grotty, so you have to "tunnel" it
> through groff's -P option. This works for me (with groff 1.19):
>
> groff -P-c -Tlatin1 -man [...]
>
> (To confuse things a bit, groff has a -c option which is documented to
> disable tty color output, which in turn requires SGR -- but it disables
> color and nothing more.)
>
> Alternatively, you may set the GROFF_NO_SGR shell environment variable.
> That's also mentioned in grotty(1).
Setting GROFF_NO_SGR seems cleaner than calling groff with -P-c all the
time (or even aliasing it).
However, it uses the old way of backspacing for bold.
There is a better way that uses ASCII escape sequences.
Try
MANPAGER="more -R"
export MANPAGER
in your .profile or use setenv if you use (t)csh.
It works for me on OpenBSD where "more" is a hard link to "less".
$ ls -i /usr/bin/{more,less}
247424 /usr/bin/less 247424 /usr/bin/more
You may need to replace "more" with "less" above.
Regards,
Zvezdan Petkovic