From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 ae052b80 for ; Sun, 24 Nov 2019 22:53:26 +0000 (UTC) Received: (qmail 26428 invoked by alias); 23 Nov 2019 18:02:21 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24463 Received: (qmail 5794 invoked by uid 1010); 23 Nov 2019 18:02:21 -0000 X-Qmail-Scanner-Diagnostics: from mail-ua1-f41.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.0/25635. spamassassin: 3.4.2. Clear:RC:0(209.85.222.41):SA:0(-2.0/5.0):. Processed in 1.708643 secs); 23 Nov 2019 18:02:21 -0000 X-Envelope-From: sgniazdowski@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.222.41 as permitted sender) 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; bh=M53tSCUUI6xjWwh0tTxmwuSctRgR+iuy7ZPdHWini2k=; b=oSjRHfGWBgl4CljN4XZ0bqrCChbhHIgQNnRuygSZUtj7BGAEyunM/uK3VgV3YuIIbi rD7GsAqo7SA8TRpb8lB/nWKzT4kiR2+7qEP6nDRgHiiQ4VDMblZhREQQ3qoqBzTDGzlh hOfVQoWm82WLIgNVAFkmL3wWQFnCB2diqSW29vlAzWF6f/xnBbs5VgNv+RYRvzx2gSw2 X1EznxFSqxod4ac5ZjE3VJSQx3GpJOyF0cZUZBn+z8wPorzVcCmJGuZkpeQZQZuQ1KA8 OcaW518A3Un/q/+Ap0UJLUbetYgUI08ZI8pPeiQy8C0gZ26x5N9zkUjmmpG5oOj4tSLk qBow== 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; bh=M53tSCUUI6xjWwh0tTxmwuSctRgR+iuy7ZPdHWini2k=; b=ooq8ModreUqx0Jes9GF/JN4qzH877WCHf+5fMWNJHwXHh/O0ufbWbPATWmJk6FPmHi cykaM7b/e9VyrMcUT4psSCXBw+zXsCqGcJ7Z0rlrr/cHsPyRgQX5oJFWWf5FDh8wHqcy R9Vsanm/MI+B9Xfa6kRRlxv2IUzZ6QU3NyVjR9k25dpNjSYoBjCcjUfbezxs7K7XU/gv chKQLn6+L8Ld+kdKhzgzLSMVsUiuRIphneIC0q3/4zvIlLszmYbEx51T8s7mPJX3SpeW f2p7426ecyf3/n86B/otCHh1NmHpG/GA+IMPzkdWXNpM1+7Ra1tarj7CMQdeD6FvB2XO HuDQ== X-Gm-Message-State: APjAAAVK+VRuaNDHktCMm2D8GJSadWzf9dvOr99XbxX76DaEwg6s0eux 2fjXlEG7UaYpf8QukrojOvnOX122FeAOcpyfnEE= X-Google-Smtp-Source: APXvYqxScB6OYyrQRXVFAH/gAm41NI9S4UfP/WXFYW+QsqROjMTOgaYI2+dmhLTPepZQFj53f97JI0B6q5dpfiNajl4= X-Received: by 2002:ab0:2805:: with SMTP id w5mr13259933uap.7.1574532104863; Sat, 23 Nov 2019 10:01:44 -0800 (PST) MIME-Version: 1.0 References: <1574419508.4702.10.camel@samsung.com> <1574435173.4702.34.camel@samsung.com> In-Reply-To: From: Sebastian Gniazdowski Date: Sat, 23 Nov 2019 19:01:38 +0100 Message-ID: Subject: Re: Is quoting of the assigned value needed? To: Peter Stephenson Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" On Fri, 22 Nov 2019 at 17:26, Sebastian Gniazdowski wrote: > > On Fri, 22 Nov 2019 at 16:08, Peter Stephenson wrote: > > > > On Fri, 2019-11-22 at 16:01 +0100, Sebastian Gniazdowski wrote: > > > I'm thinking on simplifying the plugin standard's proposed $0 > > > handling, which is currently: > > > > > > 0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" > > > 0="${${(M)0:#/*}:-$PWD/$0}" > > > > > > I.e.: about skipping the quoting. Before I do this is want to be > > > completely sure that it'll always work. > > > > Scalar assignment is always scalar assignment, yes. That's basically > > the meaning of the text I quoted saying why GLOB_ASSIGN got moved out > > to an option. I have realized that the GLOB_ASSIGN option together with GLOB_SUBST will cause problems in="/root/my_directory()" setopt GLOB_ASSIGN GLOB_SUBST 0=$in zsh: no matches found: /root/my_directory() So technically it can be even said that yes, there's a reason to quote the value, because there exists a shell configuration that will cause problems with unquoted assignments. So I'm in doubt if the change to the standard should be done, i.e.: if the quoting should be removed. Are there maybe some other configurations of the shell when similar problems might pop up? This could help to clear the doubt. The standard now uses unquoted assignment: http://zdharma.org/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html#zero-handling -- Sebastian Gniazdowski News: https://twitter.com/ZdharmaI IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin Blog: http://zdharma.org