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


Groups > gnu.bash.bug > #15419

nocaseglob and RE matching

Path csiph.com!3.us.feeder.erje.net!feeder.erje.net!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Grisha Levit <grishalevit@gmail.com>
Newsgroups gnu.bash.bug
Subject nocaseglob and RE matching
Date Mon, 23 Sep 2019 13:38:52 -0400
Lines 12
Approved bug-bash@gnu.org
Message-ID <mailman.919.1569260347.2190.bug-bash@gnu.org> (permalink)
References <CAMu=Brph2yR5sk1Y5X317dynP6YNTpWG3seCaWwvtmgNS6avPw@mail.gmail.com>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
X-Trace usenet.stanford.edu 1569260347 2003 209.51.188.17 (23 Sep 2019 17:39:07 GMT)
X-Complaints-To action@cs.stanford.edu
To bug-bash <bug-bash@gnu.org>
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=+2FtRt5ZC/Iij4oAkxxCQVYyq4Bn/b7CdGjaVdAPBvE=; b=linjNNfxNJ8NJfSFVCV401SMW6chhY9BiidZviE8v4v3pOHiW4eZ0au2g6UPmgw8Kw zO7GoISbr3IqqDU9V73dkAKLTbGM44ZHmgI4xmyQCePile5cX0c3QHPofYC5V34Nr7Bq bi3Wyhr4t9uvCs7m/Mb9tcYxNSlk/bRWLASnIGxg8CpOQMciDaU/7rMKAK+5wdegFauq kzx+gnZi0a33FUoSyyuznBLRtZ7GJJpTG470LqFIT/o4jEt6Rya0bilxa8z9xHOy7K4g YBfAYcjGZ+S4kiVv3+IeS1OViggHCoBSrEoCmdhFnswbMIII0jdOH4rVfuyXi0Fd7So4 BPwA==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=+2FtRt5ZC/Iij4oAkxxCQVYyq4Bn/b7CdGjaVdAPBvE=; b=JsjakNsG3NbdVBM0UyRxp9Bo+RfMVpgp9sOpxTxnO8qe9ODGXGfDHhZIcrCo4+FSRy MOKUZSl5yOA0orKtpsb+5alqR7DITVpgV6miP2aJ3aaEA5EXM4kfY5kz5q2Tv7IXi48O 3911OQlhMYK7l2iA+7M5mAsPZXnFI7u8+L/hPz+4W7tstvWLueA5FilNz3ybokdO+o/O 7EWTrnXpEl6nv5LUaVRNnGfULpKd970tmJRVVdrIdfy/rVfswFM5TvWBhoSjj9lZAj2F h1tKDT5AKyft+tZfXe5AEQLTRLD4k6n4Z+oYZns+spEQud8+UCEgXWoBU4o/dYdjJy47 AwVA==
X-Gm-Message-State APjAAAXwTpXhH3KS3c78jhUCjZBj+b8lkm1O9AixmQzJnqm8U7PP58Li oZSbXOnAXsPRb0NN80bJZOLIupiH6CqEr3z9PexQmFOT8hQ=
X-Google-Smtp-Source APXvYqzPSKiJNRBNILQz72URZK0NTHxjWHLZuG2PV3LVIZ815c1C0tq46UWyPylcyfDR/34M4m4iaW36rBGlABiPfZo=
X-Received by 2002:a0c:bc15:: with SMTP id j21mr338957qvg.234.1569260343112; Mon, 23 Sep 2019 10:39:03 -0700 (PDT)
X-detected-operating-system by eggs.gnu.org: Genre and OS details not recognized.
X-Received-From 2607:f8b0:4864:20::831
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
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 <https://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>
X-Mailman-Original-Message-ID <CAMu=Brph2yR5sk1Y5X317dynP6YNTpWG3seCaWwvtmgNS6avPw@mail.gmail.com>
Xref csiph.com gnu.bash.bug:15419

Show key headers only | 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