Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Inconsistencies in "-quoting and @-splitting, could someone elaborate?
- X-seq: zsh-workers 43729
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Inconsistencies in "-quoting and @-splitting, could someone elaborate?
- Date: Sat, 27 Oct 2018 12:33:00 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=ErP8Z2MgTkcHW7YTyzUT+cAZc/C7FmH2QLsbqq/j+tI=; b=Ny+y4MLoHs5sOFGw8LaiUQeOBraLfb2JQYe8qhp7eja9/qzoQOH/lS7baWTIW97e2p CbrAu5K2JdfsZ/F1d4y2edSpbk1tiOeipbm5/TsJgTUYvOp0mKw3EYLfZsXCeGMk0r0e z5bhc7Jf4m1q78gYlLpOBK9iNFNNgxoAmOiYB91jINj0LVabLJ/+NDW36Bt5z/A8S743 B/O0eJ4/xclfped9L5z+xbEuQgCClH6O/KqY0CXZzGo/tpPZ7s/RcMcQVSUpEa0wj+2T 7VkVeOfBkCgsWi0XZ13ajjZjqccUE9EFfomAJ7QJYD0VupWBWhgga2/hshpONGoKZbD4 slsg==
- 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
Hello.
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 @"
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 would add this information to Zsh Native Scripting Handbook. I will
investigate by experimenting and come up with conclusion myself if no
one will help.
Worth noting: the first behavior – no-array for singular result – can
be fixed into consistent (i.e. "always array") behavior by the updated
(A) flag, patch 40640, first appearing in Zsh version 5.4.
--
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org
Messages sorted by:
Reverse Date,
Date,
Thread,
Author