Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #11294
| Path | csiph.com!au2pb.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.ripco.com!news.glorb.com!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Chet Ramey <chet.ramey@case.edu> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: nocaseglob and =~ |
| Date | Wed, 5 Aug 2015 09:43:19 -0400 |
| Organization | ITS, Case Western Reserve University |
| Lines | 32 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.7843.1438782174.904.bug-bash@gnu.org> (permalink) |
| References | <CAAZkfoLtSWbzXyPigOVxyLOBngYRSqt+sjf_wcurN32JjBu9sQ@mail.gmail.com> |
| Reply-To | chet.ramey@case.edu |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 7bit |
| X-Trace | usenet.stanford.edu 1438782174 10877 208.118.235.17 (5 Aug 2015 13:42:54 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| Cc | chet.ramey@case.edu |
| To | isabella parakiss <izaberina@gmail.com>, bug-bash <bug-bash@gnu.org> |
| Envelope-to | bug-bash@gnu.org |
| User-Agent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
| In-Reply-To | <CAAZkfoLtSWbzXyPigOVxyLOBngYRSqt+sjf_wcurN32JjBu9sQ@mail.gmail.com> |
| X-Junkmail-Status | score=10/50, host=mpv6.cwru.edu |
| X-Junkmail-Whitelist | YES (by domain whitelist at mpv1.tis.cwru.edu) |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] |
| X-Received-From | 129.22.105.36 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.14 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <http://lists.gnu.org/archive/html/bug-bash> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| Xref | csiph.com gnu.bash.bug:11294 |
Show key headers only | View raw
On 8/4/15 11:33 PM, isabella parakiss wrote: > nocaseglob affects regex matching in [[ but according to the man page only > nocasematch should: > > nocaseglob > If set, bash matches filenames in a case-insensitive fashion when > performing pathname expansion (see Pathname Expansion above). > nocasematch > If set, bash matches patterns in a case-insensitive fashion when > performing matching while executing case or [[ conditional commands. > > > I don't know if it'd make sense to have case-insensitive glob matches and > case-sensitive regexes at the same time... It may not be that useful and > even counterintuitive. > Anyway, it's probably better to either remove glob_ignore_case from line > 67 in lib/sh/shmatch.c or document the actual behaviour, if intended. It's intended. nocaseglob has always affected the behavior of regexp matching. The nocasematch variable was introduced over 10 years ago to decouple the previous behavior, which used nocaseglob and dates back to when that variable was introduced in bash-3.0. The request was to have a variable that allowed case-insensitive matching without tying it to case- insensitive globbing. The code still uses `nocaseglob' as well to retain backwards compatibility. Maybe it's finally time to change that. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
Back to gnu.bash.bug | Previous | Next | Find similar
Re: nocaseglob and =~ Chet Ramey <chet.ramey@case.edu> - 2015-08-05 09:43 -0400
csiph-web