Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham
	autolearn_force=no version=3.4.1
Message-ID: <56D4C5FC.6000903@inlv.org>
Date: Mon, 29 Feb 2016 23:28:12 +0100
From: Martijn Dekker <martijn@inlv.org>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
MIME-Version: 1.0
To: zsh-workers@zsh.org
CC: Peter Stephenson <p.stephenson@samsung.com>
Subject: Re: Why zsh chose to be non-compliant in pattern matching
References: <CALS7p_eC1W57J671TP5GDpw4=N+__+w4b+a0Gkgaa3swKq76fA@mail.gmail.com> <CAH+w=7bZApGfDBA+1pGO8jrkWu0ioFDGpoYUsGQAWFN8sKMsPQ@mail.gmail.com> <CALS7p_ccvXTx4STR+kgbsC_QhV1Rrd_uMxYEu5-xCFAHzx5A-w@mail.gmail.com> <20160229102741.6c1d5518@pwslap01u.europe.root.pri>
In-Reply-To: <20160229102741.6c1d5518@pwslap01u.europe.root.pri>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
X-Seq: zsh-workers 38051

Peter Stephenson schreef op 29-02-16 om 11:27:
> On Mon, 29 Feb 2016 17:00:28 +0700
> Cuong Manh Le <cuong.manhle.vn@gmail.com> wrote:
>> The super user in U&L site post his opinion at
>> http://unix.stackexchange.com/a/266394/38906
>>
>> He said that the pattern matching spec is unspecified for quoted characters
>> inside bracket expression. What is your opinion?
> 
> He's talking about the standard, which indeed doesn't say anything about
> the subject.

In my view, the standard is quite clear:

"If any character (ordinary, shell special, or pattern special) is
quoted, that pattern shall match the character itself."

That sentence applies to pattern matching notation as a whole. Bracket
expressions are a part of pattern matching notation. There is no
language anywhere in the standard that excludes bracket expressions from
the sentence quoted.

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13

Thanks,

- M.

