Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Is outer quoting not needed (docs say "redundant")?
- X-seq: zsh-users 23086
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Sebastian Gniazdowski <psprint@xxxxxxxxxxx>
- Subject: Re: Is outer quoting not needed (docs say "redundant")?
- Date: Sat, 13 Jan 2018 09:36:39 -0800
- Cc: Peter Stephenson <p.stephenson@xxxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=2Ld8Hefqgeu6ebisqKRAMEw1M4T4sWrS2PBR5QhkDSE=; b=yZ6YLMc0NPFs4bERWMQFBDLZuqHZEidVhdjqlJGTTiZWNUzAJpUR5ReqzvjxbCBpoI fgPIkJg6QRJ6yw4zK8QyE0+b0M65rFutzWZMGgniQ8zAyMe07tpG4BDBiEMv56L3308a jjiAW+FoDu45CoqXBHLKqbZQX9Ze5k8Fc5eve3TA0DvU/QmjXeWLgKlBM47vmeE2FHKP WeU4mukviJk+snb03Zt07jz5ug9ch7ZtFRoxfgoxbf+w+2Zai7BQj3tTwzj3oHoF6NZF p0J8bowlGCz8muc4HgPja83P+izdifbuZnXKXZrpt8Q8Tzvw2Rg6byV/4uFnpRaiofeW JuZA==
- In-reply-to: <etPan.5a5a38c9.3e73a4c4.14e5a@zdharma.org>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CGME20171212135535epcas4p2456a2aed9c9be07c9d461acb602b71e9@epcas4p2.samsung.com> <etPan.5a2fdc87.88f1eab.c73c@zdharma.org> <20171212150024.13a1e78b@pwslap01u.europe.root.pri> <etPan.5a30d023.6d8c1390.c73c@zdharma.org> <20171213113408.1d7fb3db@pwslap01u.europe.root.pri> <etPan.5a5a38c9.3e73a4c4.14e5a@zdharma.org>
On Sat, Jan 13, 2018 at 8:50 AM, Sebastian Gniazdowski
<psprint@xxxxxxxxxxx> wrote:
>
> arr=( "${(@Q)${(z@):-"a b" c}}" )
>
> arr=( "${(@Q)${(z@):-a\\ b c}}" )
These are not the same. Because of the way backslashes behave when
they follow the :- operator plus the effect of the (z) flag, the
latter is actually the same as
arr=( "${(@Q)${(z@):-"a\ b" c}}" )
You can see this if you examine the inner expansion in isolation:
% print -rl ${(z@):-"a b" c}
a
b
c
% print -rl ${(z@):-a\\ b c}
a\ b
c
Messages sorted by:
Reverse Date,
Date,
Thread,
Author