bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nocaseglob and RE matching


From: Chet Ramey
Subject: Re: nocaseglob and RE matching
Date: Fri, 11 Oct 2019 10:09:19 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

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/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]