Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] [[:blank:]] only matches on SPC and TAB
- X-seq: zsh-workers 42780
- From: Stephane Chazelas <stephane.chazelas@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] [[:blank:]] only matches on SPC and TAB
- Date: Mon, 14 May 2018 21:42:28 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=FVIwSLFecfql1FNZjki7zkO33Jm/OIK4si1mQvGXJYk=; b=rh3bwtUOtFjY9hzgY+FjViEm1CpQC984IPF76rEOQdgjmwKh4e9IwqNV2GBwmVLlsX +Abb9z3YppaEO/u2oaQGxXztZ5Am9rUVH01StipJvtG74UBh3+MLNB9TC3a10gNFcESI HUUwJeBpbv/eufy6HcenGH1pxnvGBgdh3Nbh38uXmBeoMdz1ug5heDupROt2Y1J7079D VGW9B4+JdZCUetcuhFlz50E6blnmnXqGtf0/E5z7ysOvvXWfy4+WfAuc5eJKW7epUXzL 5dzlT04YIiBzxFvoM01iLGLvuWGCVPgm5sYkhQne+yM3Dkm5Y5DU45LLRPyBFlFJkv9J 1b4w==
- In-reply-to: <20180514195214.6lunkmugxwcatm7y@Daniels-MacBook-Air.local>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20180514063611.GA7263@chaz.gmail.com> <CGME20180514064505epcas3p1b2f178c595fc9bb962e4094e296ba699@epcas3p1.samsung.com> <20180514064431.GB7263@chaz.gmail.com> <20180514094733.308bff1a@camnpupstephen.cam.scsc.local> <20180514123425.GA19631@chaz.gmail.com> <20180514145056.3eedaea9@camnpupstephen.cam.scsc.local> <20180514155131.GC7263@chaz.gmail.com> <CAKc7PVACLxCpp4XEoizYzJLg9_qMFhrwJvZF3J+fkMudx3q+rg@mail.gmail.com> <CAH+w=7YTbR8pTm7rdeFVTCHT1Xk7fJJAJB2zi0j6fH9L4P4ULQ@mail.gmail.com> <20180514195214.6lunkmugxwcatm7y@Daniels-MacBook-Air.local>
I agree with Daniel here.
Although I think I would prefer a [[:blank:]] that consistently
matches SPC and TAB rather than something completely random
ranging from SPC and TAB (the minimum required by POSIX) and
whatever [[:space:]] matches (POSIX requires [:blank:] to be a
subset of [:space:]), I don't think it's zsh's role to fix the
POSIX character classes.
There's also the question of the consistency between
[[ $x = [[:blank:]] ]] (using zsh's own pattern matching
implementation)
[[ $x =~ [[:blank:]] ]] (using the system's EREs, so generally
influenced by the locale)
and the same with rematchpcre, that one only matching SPC and TAB
regardless of the locale AFAICT with all the character classes
only matching the minimum ASCII characters required by POSIX (as
if using the C locale with wildcards or ERE).
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author