zsh-workers
 help / color / Atom feed
From: Stephane Chazelas <stephane.chazelas@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Matching delimiters for the "e" glob qualifier
Date: Mon, 19 Aug 2019 07:46:25 +0100
Message-ID: <20190819064625.6gr2bto2fi7dtt3q@chaz.gmail.com> (raw)
In-Reply-To: <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@gmail.com>
> 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

      reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2c845fb0-d628-400f-a805-ad8356b6d87a@www.fastmail.com>
     [not found] ` <7EBD1ADA-7179-4EEF-97CA-DBE4371D80D6@icloud.com>
     [not found]   ` <876f807b-dfdd-4246-8cfe-7cf6f373ac88@www.fastmail.com>
     [not found]     ` <f053e72e-e22e-4729-a2de-eaa712119728@www.fastmail.com>
2019-08-15 16:23       ` [Feature Request] Adding option to support triple quotes Aryn Starr
2019-08-17  5:31         ` Bart Schaefer
2019-08-17  6:30           ` Stephane Chazelas
2019-08-17  8:19             ` Stephane Chazelas
2019-08-18  4:24             ` Mikael Magnusson
2019-08-18 18:58               ` Matching delimiters for the "e" glob qualifier (Was: [Feature Request] Adding option to support triple quotes) Stephane Chazelas
2019-08-18 19:55                 ` Bart Schaefer
2019-08-19  6:46                   ` Stephane Chazelas [this message]

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190819064625.6gr2bto2fi7dtt3q@chaz.gmail.com \
    --to=stephane.chazelas@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

zsh-workers

Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-workers

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.workers


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git