Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Inconsistencies in "-quoting and @-splitting, could someone elaborate?
- X-seq: zsh-workers 43732
- From: dana <dana@xxxxxxx>
- To: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- Subject: Re: Inconsistencies in "-quoting and @-splitting, could someone elaborate?
- Date: Sat, 27 Oct 2018 19:34:29 -0500
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=6zcz32eag6S/IpkoNs461iWxds9tpKwaj3+hWO5+H1g=; b=FyU1wdyFp/uDx/q+hjoyYCTanDNlj8ayPVUoIv810BUMrwfVSkTQPMbYDu0b3QizrP tP30QVYef/wFs2wDg2aeLdc3CVaUx1OJk79X3fmf6G6YITacavYuqmgXynKFmtHdyOgw +Wg5c9ZSFy8eQpA4AOaCyDi9vGjtiHUYVXSbVUtBAlKEt34rolwYA3mFIUkq5T2Szn6d zyIeHZvXrVL/NeoKUUwmkKubNJvUN0Tj31aZQwO4a6nvemNOhqvBLBkI6/u0o24EXvQo nw8h72MlsjQOD5BtpPZCP2KDtNRcrNDy505sjzCQioh7Fs4fiite0EaYA6t7kOkRiaYw uXjg==
- In-reply-to: <CAKc7PVCdqYwOrYr5-7bzduNsJd9OAUz0B-68jg_D5MqMUiVnKw@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVCdqYwOrYr5-7bzduNsJd9OAUz0B-68jg_D5MqMUiVnKw@mail.gmail.com>
On 27 Oct 2018, at 05:33, Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx> wrote:
>I'm having problem in grasping, is this behavior:
>- "X-flag creates array, unless its result is a single element", and
>- "X-flag creates array even when double quoted without use of @"
I don't know if it's accurate to say that they 'create an array' — they expand
to a list of zero, one, or multiple words (or elements, or arguments, or
whatever you want to call them), which you might then *put into* or (in certain
parameter-expansion cases) *act on as* an array, but the result of the expansion
is not an array per se.
(Maybe that's arguable when it comes to (A), given how it's implemented, but i
find it useful to think of it that way even in that case.)
On 27 Oct 2018, at 05:33, Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx> wrote:
>is this behavior consistent, or per-flag, or general
>random/historical.. Because the two behaviors seem to apply for (s::)
>and (z) (a='a b c d'; print -rl "${(z)a}" will print 4 lines, despite
>"-quoting and lack of @), but they look like a two unrelated,
>accidentally-similar, with possible further differences, exceptions,
>so I would state there's a major inconsistency/historically-driven
>problem in Zsh. Are there other such flags in Zsh?
I don't understand where the inconsistency is...? Are you just speculating that
there might be one?
dana
Messages sorted by:
Reverse Date,
Date,
Thread,
Author