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


Groups > gnu.bash.bug > #15497

Re: nocaseglob and RE matching

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: nocaseglob and RE matching
Date 2019-10-11 10:09 -0400
Organization ITS, Case Western Reserve University
Message-ID <mailman.328.1570802977.9715.bug-bash@gnu.org> (permalink)
References <CAMu=Brph2yR5sk1Y5X317dynP6YNTpWG3seCaWwvtmgNS6avPw@mail.gmail.com> <3e731c32-f644-fb13-d337-36653f4e00f3@case.edu>

Show all headers | View raw


On 9/23/19 1:38 PM, Grisha Levit wrote:
> 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.

Yeah, it's probably time to remove the glob_ignore_case.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

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


Thread

Re: nocaseglob and RE matching Chet Ramey <chet.ramey@case.edu> - 2019-10-11 10:09 -0400

csiph-web