From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 7126 invoked from network); 25 Oct 2021 21:22:27 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 25 Oct 2021 21:22:27 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1635196947; b=cscne7cgYhSZJVCJPUwiCayz8tIZ9RmCu7N20TYhgmQeq9yldlItCpua2mNRLft6Pa+6EbMi6t nOhXiY8+cmjBOOJsFpqkMhCdXAi/uzNotEWmXK4uYN8oOnpVT62/TQ1QWjBUPz+1JkS28L+Cxy uAP0XJ2Mjxv5jsUqSShttnCq7ybIcvvoClPIp54bsgIIqXj4v9+gLlfIk28owhASdIIPTdnbYv VeYdxi+pMUZkLJJmkFfXBVTe09oSucuSc8Jm17Mj8sNtFJ1PYEy0D2luDrcDqvgZu8CA+6v/11 2ZQmiwlbacG606ogORB+TMDcod6LwUQAk9X4R5/TvAzTFQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-qt1-f174.google.com) smtp.remote-ip=209.85.160.174; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1635196947; bh=/wysIGLFSCwS9b8LnR1jqwg52wyv235O1zsQtWB6LcA=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=EDBZP6Ve8La82pE5j6OLLfEW/pk+BbiXxJM1jm7nnetCQKt1mwzXVcMtP29mDmO8fS1Tnf4HFb uzjq+Cz2DflH60A8qYpAvWXx9iQGzXSRj8HccbujoTrjzdhhoTT9HjBnn1brGMr9GIm2JY8TiD 4JkFJooznfg922SiUJoRSqhdDKTf4b3eixqVok/a3t5YuCECSOVL6NlzF7GXR+WijqZUwVkJhW lRAn25UT4a3Ndd+Ns5XS2Josifxm8jD0jnXo/xOoZltJF7yGd/yP8fXzN/yS1Jxq+cNEXxLWEg EBhBwLoGK3vC78HrZLz9E9qG1IDGD16QzrfGf8ur6/i9Pw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=+le9lZFG7IsrfExn4tvd5pSMxyWJZLC32HO6wgPe2y0=; b=KUFbszXU4Qre8DNKVnaspfJAEp QB7NP+bJOd2p02GHcZNoqqB1IaSS5At+Ni3ocrQSQChppdDkATgTAE/DyOe2yImsxNeiqxKM53KHe uC/bwprsU5DKNirYYAc0V410y3p/75GKoelYKvGaPmBIEnZXHZ7lYmb6Ci32hOdzE0BKXyE7BA/mM rYvowaStgByPuX1DrrMzR/qRG1HVby9TkldQ2BtPoddblKbmb158b2wx0sD5lysmDT9uJpXlbw8uk PaD7l9rAgagnFQbsKUHSMtUQ4tw+ok4Mil9tmxDegqoI9s883PtAfak09k1HPapjtNa5/cnTJxnrs aXpAwihw==; Received: from authenticated user by zero.zsh.org with local id 1mf7QJ-0002ur-1b; Mon, 25 Oct 2021 21:22:27 +0000 Authentication-Results: zsh.org; iprev=pass (mail-qt1-f174.google.com) smtp.remote-ip=209.85.160.174; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-qt1-f174.google.com ([209.85.160.174]:45892) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mf7On-00028f-ET; Mon, 25 Oct 2021 21:20:54 +0000 Received: by mail-qt1-f174.google.com with SMTP id t2so11573499qtn.12 for ; Mon, 25 Oct 2021 14:20:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+le9lZFG7IsrfExn4tvd5pSMxyWJZLC32HO6wgPe2y0=; b=iTJtvUqKojFDhRWwag+bILKyKGZXQ+QoAzHGdqDArrSVk5uej+QfrtMYolcJnfEVur xE4aMkGywuitepft61a3q5BXfDfI3NpAsl3w46UWlXlxstZNiw7C4ldRd12WBMlPn69K ADeE3NaX/U3jtnydyCKSD8YZPLcKjPubr32p4mql+J5WuXmgDSwVzbKNnRBuVkjytun9 /8psxwcxOMSVPrUOflAdWxJYh/Hhnwy8zrODbfd8frDY4zydjyUQarph5KQvecQjjmJV iX/OZBXYWJAiaxgBdHQZsyk1EFOgSBdhmPLPovf91oAwXyPTNoZsMKy+Svz5oo/nXVEu TyFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+le9lZFG7IsrfExn4tvd5pSMxyWJZLC32HO6wgPe2y0=; b=mis8pBSOOusIYaM7dQ0jcmWfTPAVbniAI04ttwDhfNUrbz46AbRECmK3y6r7+koiug aBy0Xojki1aRCKnien0goFqfLtwxYmk5LNuXnwRqIWHz/3ab6CB18snPB2DVPu/IopNo 3X5z4VISEyMC82DZ5J1chrgsVohUTnM40G8ECa1XQnnpI33HIWmrSaEGypHSRZzbta2R Kj4nyMmIxluC+aFoghW2tU0C6t19dCtpGk04GyaM72wqpUKJOIA/QWiGfqWryzAEKMVj Fc6Aystgs/2kJYi5a6LdX1o3wc0wFQsq1eDPU0aAGR889r9VJ9ckp0ra0sp5Pjh1k7t9 Yn6Q== X-Gm-Message-State: AOAM532LZCRpZwy2xgp4+6tDGlzmBUjs2cfhcN6vWg0PzVtQGqSwoYTk u4Y3kC5Oeqydga4bR/OCa4XQOoTKBgrlY3lXiFM= X-Google-Smtp-Source: ABdhPJxi+iY/vIBuAHEsmREXSWYcvInNpXeIFUQJ5rJ83pNkgjYPOr5TrQmxJPZBdFnvM4Xq5fNJyhWbuU+0684k1Qg= X-Received: by 2002:ac8:7c52:: with SMTP id o18mr20624932qtv.139.1635196852370; Mon, 25 Oct 2021 14:20:52 -0700 (PDT) MIME-Version: 1.0 References: <20211025194508.GB8612@tarpaulin.shahaf.local2> <048e0b3d-6da9-4905-b1ad-253647cea0d3@www.fastmail.com> In-Reply-To: <048e0b3d-6da9-4905-b1ad-253647cea0d3@www.fastmail.com> From: Roman Perepelitsa Date: Mon, 25 Oct 2021 23:20:39 +0200 Message-ID: Subject: Re: Disabling null elision (was: Re: Most Recent File) To: Daniel Shahaf Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 27295 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On Mon, Oct 25, 2021 at 10:42 PM Daniel Shahaf wrote: > > Roman Perepelitsa wrote on Mon, 25 Oct 2021 20:02 +00:00: > > > It's also nice that this option would affect parsing, only evaluation, > > so it won't be necessary to care about it when defining functions. > > How so? Some options can be set within a function for the function to work as the author has intended. For example, extended_glob. function foo() { emulate -L zsh -o extended_glob # can extended-glob here to one's heart's content [[ $1 == a## ]] } Other options must be set when the function is defined. For example, brace_expand. # if brace_expand is unset here, bar is screwed unset brace_expand # bwa-ha-ha function bar() { emulate -L zsh -o brace_expand # this won't help typeset var{1,2,3}=42 } setopt brace_expand # this won't help either bar # oh no! Options of the second kind cause more grief. As Bar says, autoload -Uz is key when it comes to loading plugins and sourcing is a losing game (I learned this from Bart earlier). Sometimes you still have to have a function in a plugin that must run with user options but at least that's just for evaluation and not for parsing. Roman.