public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: L A Walsh <cygwin@tlinx.org>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: change in pattern matching in pager /usr/bin/less
Date: Mon, 02 Sep 2019 00:50:00 -0000	[thread overview]
Message-ID: <5D6C6749.1080706@tlinx.org> (raw)


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

             reply	other threads:[~2019-09-02  0:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-02  0:50 L A Walsh [this message]
2019-09-02  7:25 ` Wayne Davison
2019-09-02 13:32 ` Steven Penny
2019-09-03  7:05 ` Andrey Repin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5D6C6749.1080706@tlinx.org \
    --to=cygwin@tlinx.org \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).