From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-return-43729-ml=inbox.vuxu.org@zsh.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id fa4c39ab for ; Sat, 27 Oct 2018 10:33:31 +0000 (UTC) Received: (qmail 26050 invoked by alias); 27 Oct 2018 10:33:17 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 43729 Received: (qmail 26828 invoked by uid 1010); 27 Oct 2018 10:33:17 -0000 X-Qmail-Scanner-Diagnostics: from mail-oi1-f169.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.167.169):SA:0(-2.0/5.0):. Processed in 2.273885 secs); 27 Oct 2018 10:33:17 -0000 X-Envelope-From: sgniazdowski@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=ErP8Z2MgTkcHW7YTyzUT+cAZc/C7FmH2QLsbqq/j+tI=; b=FryMy7aQ+eOC24roG6H5fJoBEfnWuDOHgJUjGWACo1mB1g/vhTtHYSHyOjwh4z+IeY of5gIEN+6HKDb94QplMxJVfQ3jrEmaNtnaUUJ/Hh9LQxEkDTBMuvx0xIBo/m6B1i3xqG JwYfYeJjZcdTmtJvuRIV2uqOuC+FP3Fd/Tw7ONKxFu1Ak2uqWPh1CjoludaYyCDVpeWk Xo1ttR/vcAVYNkGCeDUOskHLiiB1XzZm9498UoAsI5WUD7r72tjd15jvDtc2Hs8GnQ4W dD129z6rr0I+4oUPeifxRCU8nlpAH7dKinFy9XC3lpqbJX1N+gXhevVU3P66T84+E1bn RF5g== X-Gm-Message-State: AGRZ1gI+S/Pmq6hhwZIR+YkVLAd8uQTNjNHY0w573r42YsU/4T9zTXio BOh3cRCfYww0gS1kuNRJDRpPwvdwH/IYCh+TMMmTXZM3 X-Google-Smtp-Source: AJdET5ekl/M89laPlpUNhQafcIHz7aKVifBOvOI/woCqrYPAN7VRJW9nCNxhQVOeHa5Y+fnYty8ByVktRNeIpI58ifo= X-Received: by 2002:aca:aa84:: with SMTP id t126-v6mr4449880oie.218.1540636392034; Sat, 27 Oct 2018 03:33:12 -0700 (PDT) MIME-Version: 1.0 From: Sebastian Gniazdowski Date: Sat, 27 Oct 2018 12:33:00 +0200 Message-ID: Subject: Inconsistencies in "-quoting and @-splitting, could someone elaborate? To: Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=3D'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 =E2=80=93 no-array for singular result =E2= =80=93 can be fixed into consistent (i.e. "always array") behavior by the updated (A) flag, patch 40640, first appearing in Zsh version 5.4. --=20 Sebastian Gniazdowski News: https://twitter.com/ZdharmaI IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin Blog: http://zdharma.org