Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Matching delimiters for the "e" glob qualifier
- X-seq: zsh-workers 44689
- From: Stephane Chazelas <stephane.chazelas@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Matching delimiters for the "e" glob qualifier
- Date: Mon, 19 Aug 2019 07:46:25 +0100
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=UeqTKKfiHfsUouQGJ/HMUbl228OBwWfI8TE+kjFvKic=; b=HhcjIXifqj9zTfel0ncJtMbVz9jc/WoYZ8GH85A80S2Fr0pKF42unvUrysgln/kGbk bRZ2+L/I6iJMz7FJKop1iBnUpCcl4gP48dUPFnMOQVIipB0F6HVSb5JIyEq3KPfWLbAf JijyxcM03XHup3XSXtgnl6ib5JDJ82BpBHx0c3HqXCWHa+RwI3gZiwG3NRFyu4qXP5Ut UvGxN3mizecbYZ+xgm4Ion3dVN5fzTgxXrmVm/fDHSZVOSlEVUanSOzWV+nUTFPgzwov kTh74vB/U4QElnMvx3nHNFHAH8SyYdqqF2HHO32u7F5e/meteAI9YBnkVEtiiJvxh62Q r9jA==
- In-reply-to: <CAH+w=7YbPiU6ES9bxZkakeCu1fGZM-rttk-=1spSDvZJ15Uoqw@mail.gmail.com>
- 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: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <2c845fb0-d628-400f-a805-ad8356b6d87a@www.fastmail.com> <7EBD1ADA-7179-4EEF-97CA-DBE4371D80D6@icloud.com> <876f807b-dfdd-4246-8cfe-7cf6f373ac88@www.fastmail.com> <f053e72e-e22e-4729-a2de-eaa712119728@www.fastmail.com> <AAFFC725-E38F-4307-8E21-8A443FC0FFBC@icloud.com> <CAH+w=7bh3d950w_kT8KN5MeDjagapuoSqbWRBmFo8S=ZTUnwvg@mail.gmail.com> <20190817063009.7niz4cz2tuqx3ksu@chaz.gmail.com> <CAHYJk3RAKmxRqZ4CRBEZBAco4017CMwm+Hbw4co-z2v1V2OK=Q@mail.gmail.com> <20190818185817.55qgvidggem6hamh@chaz.gmail.com> <CAH+w=7YbPiU6ES9bxZkakeCu1fGZM-rttk-=1spSDvZJ15Uoqw@mail.gmail.com>
2019-08-18 14:55:09 -0500, Bart Schaefer:
> On Sun, Aug 18, 2019, 1:59 PM Stephane Chazelas <stephane.chazelas@xxxxxxxxx>
> wrote:
>
> > Are we guaranteed it will stay that way?
> >
>
> Yes.
Thanks. I found that it also works for [...] (which is probably
the one I'll settle on for my own use) and the extended glob
ones (#, ^, ~, the latter only with #q when using extendedglob),
but also "-"!
Which harks back to
https://www.zsh.org/mla/workers/2019/msg00465.html
Which was also asking (among other things) about the special
treatment of "-" in
$ string=- pattern='\-'; [[ $string = $~pattern ]] && echo yes
yes
(I had no feedback on that one at the time).
Here maybe zsh could extend it to all characters as doing it for
only *?[]^~#- and not others (I've not tested all possible ones)
seems a bit arbitrary.
> $ (echo a(eé'echo é'é)) |& sed -n l
> > zsh: unknown file attribute: ^\003$
> >
>
> You can't use multibyte characters as the delimiter there.
[...]
Sorry for causing confusion there. UTF-8 é as delimiter is fine
there.
$ zsh -c 'echo /(eé"echo x"é/)'
x
/
The issue I wanted to raise was the bogus error message when
using é as a glob qualifier. It can be reproduced without the
"e" qualifier:
$ zsh -c 'echo /(é)' |& sed -n l
zsh:1: unknown file attribute: ^\003$
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author