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 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: References: 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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: Xref: csiph.com gnu.bash.bug:15419 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.