On Sun, Jan 11, 2004 at 12:42:14AM +1100, Gavin Sinclair wrote:
> The following command gives an overview of Pathname, complete with
> colorization of headings, etc.
>
> ri -f ansi -T Pathname | less -R
>
> "-T" sends output to STDOUT instead of a pager. "less -R" tells
> 'less' to accept ANSI codes. Unfortunately, I don't know how to
> set default options (-f ansi) for 'ri'.
>
> 'ri' does respect $PAGER, though, so the next two lines achieve the
> same result as the one above.
>
> export PAGER='less -R'
> ri -f ansi Pathname
>From less(1):
Options are also taken from the environment variable
"LESS". For example, to avoid typing "less -options ..."
each time less is invoked, you might tell csh:
setenv LESS "-options"
or if you use sh:
LESS="-options"; export LESS
So one could simply add the R option to the LESS environment variable to
achieve the same effect.
--
Jos Backus _/ _/_/_/ Sunnyvale, CA
_/ _/ _/
_/ _/_/_/
_/ _/ _/ _/
jos at catnook.com _/_/ _/_/_/ require 'std/disclaimer'
|