Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Why does {..} expansion using 'bindkey' quoting, but {,} and BRACE_CCL don't quote at all?
- X-seq: zsh-workers 49243
- From: Marlon Richert <marlon.richert@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Why does {..} expansion using 'bindkey' quoting, but {,} and BRACE_CCL don't quote at all?
- Date: Thu, 5 Aug 2021 09:17:38 +0300
- Archived-at: <https://zsh.org/workers/49243>
- In-reply-to: <CAH+w=7YmBRdW51WA=wY34kz_Si1ScnSOKzvaFPJO-eDGQ4G1kg@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAHLkEDsib=h6_44ZO0CBC-XxbbPi7Wvypi8JKwaRa1uS9uK__w@mail.gmail.com> <CAH+w=7YmBRdW51WA=wY34kz_Si1ScnSOKzvaFPJO-eDGQ4G1kg@mail.gmail.com>
On Wed, Aug 4, 2021 at 6:52 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Wed, Aug 4, 2021 at 12:05 AM Marlon Richert <marlon.richert@xxxxxxxxx> wrote:
> >
> > Is there a reason for this inconsistency? Why not always produce
> > quoted or unquoted output?
> >
> > Also, why bindkey-style quoting? Wouldn't ${(q+)}-style quoting be
> > more convenient, since it's more straightforward to "unquote"?
>
> The answer to "why doesn't feature A take advantage of feature B" is
> often "because A was developed long before B".
>
> I believe that's the case in both instances here. BRACE_CCL and {x,y}
> existed before {a..z}, and {a..z} existed before $'..'. Old code was
> never updated to be consistent with newer code, either from simply
> being overlooked, or for backwards compatibility.
I just wish {a..z} didn't use quoting at all. :)
I understand, though, that it's hard to change at this point, because
of backwards compatibility.
How would you feel about adding a shell option to make {a..z}
unquoted? (Or failing that, an option to make all of them
$'..'-quoted.)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author