[Linux-disciples] A command-line equivalent to less(1)'s "@"/^F option

Chung-chieh Shan ccshan at post.harvard.edu
Sun Feb 17 18:07:03 EST 2013


On 2013-02-15T12:07:10-0500, Steve Laniel wrote:
> I think this list needs to be dusted off and taken out for a drive once per year.

Sounds good.

> Whenever I do a search ("/") in less(1), I always want the search to wrap around if it doesn't find the text between the current line and EOF. I can force this behavior with "/@pattern" rather than just "/pattern", but I'd prefer that it always be there by default -- so that my typing "/pattern" gets me the "/@pattern" behavior automatically. I didn't find any way to do this in the man page, and Google didn't turn up anything. Am I SOL? Effectively I'm just looking for the same behavior from less(1) that I get in vim(1). There are lots of command-line options that you can set in $LESS -- I use "-iR" -- but the "@" behavior doesn't seem to be one of them.

It seems that /@pattern in less(1) isn't the same as wrapscan in Vim.
/@pattern means start searching from the beginning of the first file,
even if there is a match below the current position.  wrapscan means
start searching from the beginning of the current file if there is no
match below the current position.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20130217/00e2612a/attachment.pgp>


More information about the Linux-disciples mailing list