Consider the following file:
$ LESS= \less test abc def abc
By default, searching
less will jump to line 3 since
/pattern search starts at second line according to
man 1 less:
/pattern [... snipped ...] The search starts at the second line displayed (but see the -a and -j options, which change this).
-j do not help.
It's annoying that I have to do a backward search (N) after each
/pattern search to make sure I have not missed anything important in the first line.
How do I make
less pattern search starts at first line displayed?
$ less --version less 436 Copyright (C) 1984-2009 Mark Nudelman less comes with NO WARRANTY, to the extent permitted by law. For information about the terms of redistribution, see the file named README in the less distribution. Homepage: http://www.greenwoodsoftware.com/less