Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15419

nocaseglob and RE matching

From Grisha Levit <grishalevit@gmail.com>
Newsgroups gnu.bash.bug
Subject nocaseglob and RE matching
Date 2019-09-23 13:38 -0400
Message-ID <mailman.919.1569260347.2190.bug-bash@gnu.org> (permalink)
References <CAMu=Brph2yR5sk1Y5X317dynP6YNTpWG3seCaWwvtmgNS6avPw@mail.gmail.com>

Show all headers | View raw


Currently nocaseglob and nocasematch both control case insensitivity
of RE matching (in lib/sh/smatch.c):

  if (glob_ignore_case || match_ignore_case)
    rflags |= REG_ICASE;

However, the documentation suggests that only nocasematch should have
this effect.  I'm guessing this behavior was in bash-3.1 for
compatibility with bash-3.0 (in which nocaseglob *was* the documented
way to turn on case insensitive RE matching, prior to nocasematch
being added) but it doesn't seem to make much sense now.

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

nocaseglob and RE matching Grisha Levit <grishalevit@gmail.com> - 2019-09-23 13:38 -0400

csiph-web