zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: auto-quoting inside braces in arguments
Date: Fri, 19 Feb 2021 14:15:32 -0800	[thread overview]
Message-ID: <CAH+w=7ZAv6AYUM3P9QiShvjomZqQHHcNTq1ifRh7NXHo=Ou50g@mail.gmail.com> (raw)
In-Reply-To: <20210219122914.GB1706295@zira.vinc17.org>

On Fri, Feb 19, 2021 at 4:17 AM Vincent Lefevre <vincent@vinc17.net> 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@vinc17.net> 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@vinc17.net> 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.


      reply	other threads:[~2021-02-19 22:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-18 13:40 Vincent Lefevre
2021-02-18 17:35 ` Daniel Shahaf
2021-02-18 18:30   ` Bart Schaefer
2021-02-18 18:52     ` Bart Schaefer
2021-02-19 12:24       ` Vincent Lefevre
2021-02-18 18:57     ` Ray Andrews
2021-02-18 19:07       ` Bart Schaefer
2021-02-18 21:49         ` Ray Andrews
2021-02-18 22:12         ` Daniel Shahaf
2021-02-18 22:44           ` Bart Schaefer
2021-02-19 16:10             ` Daniel Shahaf
2021-02-19 16:50               ` Daniel Shahaf
2021-02-19 21:53                 ` Bart Schaefer
2021-02-19 12:17     ` Vincent Lefevre
2021-02-19 12:29       ` Vincent Lefevre
2021-02-19 22:15         ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly 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='CAH+w=7ZAv6AYUM3P9QiShvjomZqQHHcNTq1ifRh7NXHo=Ou50g@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).