From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-return-43735-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 8b484903 for ; Sun, 28 Oct 2018 11:54:50 +0000 (UTC) Received: (qmail 25295 invoked by alias); 28 Oct 2018 11:54:34 -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: 43735 Received: (qmail 15421 invoked by uid 1010); 28 Oct 2018 11:54:34 -0000 X-Qmail-Scanner-Diagnostics: from mail-ot1-f53.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.210.53):SA:0(-2.0/5.0):. Processed in 3.040291 secs); 28 Oct 2018 11:54:34 -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:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=lV6UoJkOTOkpYklsR1i9jPnAfaO2ygA9p9qkc0Y4jok=; b=prGVDz2rX7Dme0Lsx+9T2+P4a1YyqCoVPPEnpEXRDoo/n+AVfBzwG9dTzP20ItXSUR iioRGNbT7svE1POd828wi8QmDokvKUg0i+HRQHkvE1zfvtm9lUVjcKzMLXViW6A6nGaZ u1EAdvyxKSA/ARRus+PVM6m46dcf0twDNr29ovs0o8FWUx8UKxqYO1mpJooALfnlIBMo uc4FI0QZGj6RhStPGs8VddfyQPNncIGO53kcT6cnohTYf7nY0KRK1+RxjU6QCFEn6puQ X9VuuOayr3TUWkP76vX5jscRtZBYVs2dNmE2e+nq9TfOE5VEFiwqFqeDdzLap5mfINCo zPGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=lV6UoJkOTOkpYklsR1i9jPnAfaO2ygA9p9qkc0Y4jok=; b=iHo3d+8CJlgxpMTsCZ9rKs8K4dUWrwgs4e8VaEYlATCMcT7wXVrT1Fpx0lhsxfSmQx 2pbZcVOB2Ob49GTDLuDWriBT8pvyggfA9n9MW0vSyQ3DS7rHH+ioWlewecBY3jPRyJ0K 87Vy719QeJUo3wWLpD/8BU6BydOVhdvZrIwqAX3leycw4O78ZPHTgNpJ5KjekWGJ0CHm oUSl79X7yVJQfeaxR5mtVgnZUxMGazBiLh7GqM6/9EL0ILzPj2iSeFyytfEEi2iEMZeO 6lCk8uZmfeWq2jq5RbLLv8CKQCdVnirbVhLv2Psdtkor4Zrha5G3ZzlC5uH6nl2DeXK2 nCUA== X-Gm-Message-State: AGRZ1gLmWsOZfE4Me7bRb8hquANGb4Y2j5AYuE0qhHpZnWThDrM49CHp bcZEBmEJp+FnXfMtrrKshuokzFo0yLM741I+ccd2yWdg X-Google-Smtp-Source: AJdET5d+TzuXVmZfJJy1iCu0ehWBiUqzzN+KSmuH7utmOkzGnfpEkCbXU0dR/coGEQ5uaYwGND+YqhCRYAcWh3pgwnc= X-Received: by 2002:a9d:3284:: with SMTP id u4mr6960692otb.134.1540727668121; Sun, 28 Oct 2018 04:54:28 -0700 (PDT) MIME-Version: 1.0 References: <1BE52C46-161F-412B-A539-4B0EA87A2FCE@dana.is> In-Reply-To: <1BE52C46-161F-412B-A539-4B0EA87A2FCE@dana.is> From: Sebastian Gniazdowski Date: Sun, 28 Oct 2018 12:54:15 +0100 Message-ID: Subject: Re: Inconsistencies in "-quoting and @-splitting, could someone elaborate? To: dana Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, 28 Oct 2018 at 02:34, dana wrote: > >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 speculatin= g that > there might be one? @ is refered to as "@ -- double-quoted splitting of scalars" in completion. I understand it as: for quoted expression, regenerate array-form by doing splitting. So "$array" is a single string containing the whole array contents (if not ksharrays, where it would have only 1st element), while "${(@)array}" is still an array, because theoretically, like the completion says, the "-induced string is split to again become an array. So one can obtain always-array behavior with @. This flag doesn't help (s::) and (z) when the result is string. I feel this is inconsistent, I should be able to "split" the resulting string into an array, like it would happen here with @ and array: % array=3D( "foo" ) % print "${#${(@)array}}" 1 Despite array is single element, @ splits it into array type. (s::) and (z) behave differently for single-element result, that is one (maybe subjective) inconsistency, and for the second =E2=80=93 @ doesn't he= lp (ie. (z@) still doesn't return as an array), that's second inconsistency IMO. --=20 Sebastian Gniazdowski News: https://twitter.com/ZdharmaI IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin Blog: http://zdharma.org