From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: auto-quoting inside braces in arguments
Date: Thu, 18 Feb 2021 13:49:28 -0800 [thread overview]
Message-ID: <e5117231-48d4-3615-728b-b291483b27c8@eastlink.ca> (raw)
In-Reply-To: <CAH+w=7b8y3ZJ3U29HYdHoUQvwxGsqzkUmfJdLhK+vvr+mX_4fg@mail.gmail.com>
On 2021-02-18 11:07 a.m., Bart Schaefer wrote:
> On Thu, Feb 18, 2021 at 10:57 AM Ray Andrews <rayandrews@eastlink.ca> wrote:
>> Given the deep desire of shells to strip and interpret quotes
> You're still misinterpreting this. It's pretty straightforward:
> -- quotes are interpreted ONCE when the command line is processed.
> -- the only time quotes are ever interpreted AGAIN is with "eval".
>
> Stop "eval"-ing things and you'll stop having problems.
As I was saying, my whole zsh universe revolves around it. Might have been
a mistake at the getgo. Still, every problem has been solved one way or
another and it's me trying to make the shell do what it doesn't want to do
so if it isn't easy that's my problem.
>
> If for some reason "eval" is absolutely necessary, THEN you need to
> assess what quoting interpretation you WOULD have used if the
> argument(s) to eval were the original command line, and re-apply those
> quotes, which zsh makes possible with ${(q)...} or ${(qqq)...} or
> whatever.
>
(q) gets close to my philosophical instinct of how the thing should
work. But if
there was some way of providing a string with absolute protection then I
could
proceed naively -- the string is always going to be exactly as I typed
it. Nevermind
tho, my functions work 90% as close to my theoretical model as I could want.
Remaining issues are whiny not substantive.
next prev parent reply other threads:[~2021-02-18 21:50 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 [this message]
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
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=e5117231-48d4-3615-728b-b291483b27c8@eastlink.ca \
--to=rayandrews@eastlink.ca \
--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).