Zsh Mailing List Archive
Messages sorted by:
Re: Is quoting of the assigned value needed?
- X-seq: zsh-users 24460
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- Subject: Re: Is quoting of the assigned value needed?
- Date: Fri, 22 Nov 2019 16:01:07 +0100
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZnF68od2nW0rZUddMZTlfqo1eOcLj+aGIHHomZoYR3E=; b=qJtC8dqZ5owKhR+tBmDLPlVtw4XSO88a+kU3t0w9Do1wznJx3QiH8SkA4Ubx5HO2++ +/HueQzdT7w3Fn1jYVH2eWfMbdIgxebFlkOfnL1A1XyPJiyK+LzhhHGe+GgjP0VGY2hz teMwIW8vzasfHLT3L264UzstLJVveEKY8+2Ouhbmb1pUWegAlaFRMjDkm1/0Cr1fFreN uQZrxz1I9KO/6q4oFBU1gLBBMhYq3nr8RoCiQTjdjhk8ajOwVPMmx5IPMIz495kY7r5L 3mjzu9glx5muHKH2cfMDmeypj5/tla597gzQ2u+QHm5JAwT4a06lZYJP/o/sgEPUHUS+ XCbg==
- In-reply-to: <email@example.com>
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:email@example.com>
- List-unsubscribe: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CGME20191122020437eucas1p128174332018d20a266f55007fcf271ba@eucas1p1.samsung.com> <CAKc7PVAUqWfNvvJi+k7A9qW7g9w3GqaUTXTML0yWo9fHGUuwbA@mail.gmail.com> <email@example.com>
On Fri, 22 Nov 2019 at 11:46, Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> On Fri, 2019-11-22 at 03:03 +0100, Sebastian Gniazdowski wrote:
> > Hello,
> > SH_WORD_SPLIT doesn't seem to cause any effects in this context:
> > setopt SH_WORD_SPLIT
> > var1="a b"
> > var2=$var1
> > print "$var2"
> > Output: a b
> Correct, there's no splitting there: you've got a quoted assignment, a
> single word assignment, and quoted output.
> What you should be doing depends on what you're trying to do, which you
> don't say.
I'm thinking on simplifying the plugin standard's proposed $0
handling, which is currently:
I.e.: about skipping the quoting. Before I do this is want to be
completely sure that it'll always work.
> Do you want var2 to be an array of split parts of $var1? In
> that case, do an array assignment.
Messages sorted by: