Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: auto-quoting inside braces in arguments



On Fri, Feb 19, 2021 at 4:17 AM Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
>
> For instance
>
>   echo {ab cd"ef }" $ZSH_VERSION {0..2} }
>
> should be equivalent to
>
>   echo "{ab cdef } $ZSH_VERSION {0..2} }"

I think the other problems with this scheme are going to scuttle it
anyway, but I would point out that for every other quoting mechanism,
the quotes themselves are removed (leaving only the string that's
between them), but here you are suggesting that the braces remain in
the result.


On Fri, Feb 19, 2021 at 4:24 AM Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
>
> On 2021-02-18 10:52:01 -0800, Bart Schaefer wrote:
> >
> >   { echo what does {this mean}
>
> This happens to be just because of the space before "mean",

Obviously, but isn't the point of your suggestion that said space
would no longer be significant?  Which is a problem for current usage.


On Fri, Feb 19, 2021 at 4:29 AM Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
>
> though this would introduce a difference. Currently:
>
> zira% echo {{a..c}
> {a {b {c
> zira% echo {{a..c}}
> {a} {b} {c}
> zira% echo {a..c}}
> zsh: parse error near `}'

The first two are more problematic than the third.  In fact, the third
one wouldn't be changed by your suggestion at all, as far as I can
tell.




Messages sorted by: Reverse Date, Date, Thread, Author