man page search highlights
David Kelly
dkelly at HiWAAY.net
Mon May 19 17:48:22 PDT 2003
On Monday 19 May 2003 07:23 pm, Giorgos Keramidas wrote:
> On 2003-05-20 08:08, Robert Storey <y2kbug at ms25.hinet.net> wrote:
> > Once again displaying the ignorance of a Linux refugee/FBSD
> > newbie...
> >
> > When viewing man pages, I often use the search feature:
> >
> > /searchstring <enter>
> >
> > The difference I've noticed between Linux and FBSD is that in
> > Linux, if the search string is found, the string is highlighted. I
> > find that a very useful feature. Is there some way to enable this
> > function in FBSD man pages?
>
> more(1) doesn't highlight matches.
> less(1) does.
>
> Set your PAGER to 'less' and it should "just work" :-)
Actually on FreeBSD more is less, but running in "more compatibility
mode":
% ls -li /usr/bin/less /usr/bin/more
9454 -r-xr-xr-x 2 root wheel 85740 Apr 21 09:00 /usr/bin/less
9454 -r-xr-xr-x 2 root wheel 85740 Apr 21 09:00 /usr/bin/more
Also, I like to add this to my ~/.cshrc:
setenv LESS '-aciMs -j5'
One of the handy items is the -j5 which places the search hit 5 lines
from the top of the screen/window so you can see some of what precedes
it.
--
David Kelly N4HHE, dkelly at hiwaay.net
=====================================================================
The human mind ordinarily operates at only ten percent of its
capacity -- the rest is overhead for the operating system.
More information about the freebsd-questions
mailing list