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?



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