zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Ray Andrews <rayandrews@eastlink.ca>
Cc: zsh-users@zsh.org
Subject: Re: permission denied
Date: Fri, 21 Apr 2023 14:58:25 -0700	[thread overview]
Message-ID: <CAH+w=7ZuxiMADfnBZ0g+sp5yh=GxLRbi56OA2OeQuem+fBKaEw@mail.gmail.com> (raw)
In-Reply-To: <171aa87a-f52e-6fc0-d8c1-8ad6be9c9838@eastlink.ca>

On Fri, Apr 21, 2023 at 7:42 AM Ray Andrews <rayandrews@eastlink.ca> wrote:
>
> On 2023-04-21 07:12, Peter Stephenson wrote:
> >
> > Yes, you can do ${(Q)${(z)1}} which does the splitting, then removes the
> > quotes (without any more splitting).

That's probably not what you actually want to do, though.  When I gave
you the (z) solution, there was no expectation that you'd directly
execute $chain -- it's not going to do the right thing if it actually
is a chain of two or more commands, or has redirections, or any other
complexity; instead it will just run the first command with all the
separators and subsequent tokens and commands as part of the argument
list.

In this circumstance using eval would be much closer to correct.  But
--- why are you even bothering to split it at all if the intention is
to run it?  I thought the point was to put it in the history or some
other editable place as separate commands.


  reply	other threads:[~2023-04-21 21:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-17 18:34 Ray Andrews
2023-04-17 19:07 ` Roman Perepelitsa
2023-04-17 20:41   ` Ray Andrews
2023-04-17 21:52     ` Bart Schaefer
2023-04-17 22:44       ` Ray Andrews
2023-04-18  2:41         ` Bart Schaefer
2023-04-18  3:35           ` Ray Andrews
2023-04-20 21:35             ` Ray Andrews
2023-04-20 21:47               ` Roman Perepelitsa
2023-04-20 22:09                 ` Ray Andrews
2023-04-20 22:13                   ` Bart Schaefer
2023-04-20 22:47                     ` Ray Andrews
2023-04-21  3:12                       ` Bart Schaefer
2023-04-21 13:33                         ` Ray Andrews
2023-04-21 14:12                           ` Peter Stephenson
2023-04-21 14:42                             ` Ray Andrews
2023-04-21 21:58                               ` Bart Schaefer [this message]
2023-04-22  0:56                                 ` Ray Andrews
2023-04-20 22:17                   ` Roman Perepelitsa
  -- strict thread matches above, loose matches on Subject: below --
2020-12-21 23:01 Ray Andrews

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=7ZuxiMADfnBZ0g+sp5yh=GxLRbi56OA2OeQuem+fBKaEw@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=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).