change in pattern matching in pager /usr/bin/less

L A Walsh cygwin@tlinx.org
Mon Sep 2 00:50:00 GMT 2019


For some reason, the behavior of less has changed recently in regards to how
it interprets characters like '\s' (whitespace).

Unlike previous versions which worked to use '\s' for whitespace and
use '+' for '1 or more', there seems to be nothing for \s
and to use '+' you would need <CHAR><CHAR>*.

This puts the cygwin 'less' at variance with the version I'm using on
linux.

part of this is that the new cygwin less appears to use Obsolete REs
that don't support '+'.  That may be a compile flag.

I don't know why \s is not working, however, 'awk' used to be the definitive
Extended (modern) RE reference and does use \s for whitespace.

My  linux less is at version 458 (POSIX RegEx)
my cygwin less is at version 530 (POSIX RegEX)

It could be the libraries they are linking into for RE's.
Though both appear to use the Gnu regex stuff.

Note, I'm not just saying cygwin less is different from linux less,
but also that the cygwin less is different from how it used to be.

Regularly when looking at a manpage, I use the search string:

^\s+topic\s

to find header words or cmds, etc.  I.e. it starts on a line by itself and
has multiple whitespace characters before it and 1 after.  I may need to
repeat the search a few times, as the word searched for can also be 1st on
a line.

Like to find 'typeset', I'd use '^\s+typeset\s'.

That no longer works in cygwin.

Idea?  Fix please?







--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list