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,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2822 invoked from network); 25 Oct 2021 20:42:27 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 25 Oct 2021 20:42:27 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1635194547; b=Scs/LkIuBONHLEjLuOKFaLszFb9b4Sh2Gsbm9Qvl0BfO5gtB9D7MXq9SJjQiN4wva3wpiUjHqt ITHleTEECr/XM5pvxeR3OU516PdHlr4uni/QJr+03OQbgvofgibq8PxxXAwDNTlcPxkVnDzHNb dabvsLPMsjoe+t/pbCipD9UuCz1VdinUE9YLxWWv0G1F74WBARJvwZVbvHG8iTwLOAX503YOY3 ehG3jt9i4kwLUOhAKAmwjywW2KGOws/jWgz8hDxnrw0p393BrMmzDRRAoAkb2e44VMUJUIlcAe MNWJvmOE/zItlJlw/iMzs6NjwbW3K7jDhxzKVYrMi1pvUA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (out2-smtp.messagingengine.com) smtp.remote-ip=66.111.4.26; dkim=pass header.d=daniel.shahaf.name header.s=fm1 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm1 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1635194547; bh=pVVFq3ZnMgsCnHLCh/JVSQwuuKoPH6NutNlL1MvbQ/c=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Subject:To:From:Date: References:In-Reply-To:Message-ID:MIME-Version:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=esHowtjOO/s7A5IHWrjZs8Cz5dgKHnSrW1230feE+70O3gneNxeDEvD/Ue3IpqTcmddu78zBOt XG0mDNHRywMt7wk6udGlAzPGaQfGwYmRuKJVjRypj+VHMuUylcy/d2mW4hXymhr1O6dkHzrT/m Zc5sZ68soFC470R8pbqS/ixt8QuzTW67/NvpUwuO2Mh8h461Esqn2jQeg5HEqL7iBV0PJaOeok a6K34Cfb2xhVx5Eodf42QS1b6DMsww3yDmnqmqcZeZcnESOWQYCvbJBlbnygTLYRa20P1Uy0mn PogU/p984eK9HetVx9kVA3wWrrzTQm3oGz5JiTO4YvoR+g==; 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-Transfer-Encoding: Content-Type:Subject:To:From:Date:References:In-Reply-To:Message-Id: Mime-Version:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=XrW+jXGtPoVs64BqVEwjkr1KJxVF+Jf/sdtcp2VyorA=; b=kZeSs+J1r+gnBpR4TA5ExWc79H Q3y7I3ecIiyauhiZfnYlbDPPnIToCj3EImUQ9jJjerULETP6BTgBkQB6p2ktg//70QnxbNqa5s3bx x9kPo5orrLl968Atv+jG6iTERQ+nlztmiY7vhl0gdkA6nhZaw0Qy2jY50/w0v88Pjz6hzM4t+ZlBV 4T6QZEx9to+NYYghV3JRWYWxNeMAP6lrrxV7PsBBZXN+8+U8h+3JbSXdFX3dVT18BvOMBhpZudLjl IL7FkIMmQ3GTc0ip7+H1hnyfYrvsGbPeSNK2sDJsy3LjkdCeK/7Z0s97WqcQRkhkgehMH2sO80MwN IyExZpsw==; Received: from authenticated user by zero.zsh.org with local id 1mf6na-000Me2-TU; Mon, 25 Oct 2021 20:42:26 +0000 Authentication-Results: zsh.org; iprev=pass (out2-smtp.messagingengine.com) smtp.remote-ip=66.111.4.26; dkim=pass header.d=daniel.shahaf.name header.s=fm1 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm1 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none Received: from out2-smtp.messagingengine.com ([66.111.4.26]:35975) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1mf6mg-000LyZ-0a; Mon, 25 Oct 2021 20:41:31 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 8052E5C0326 for ; Mon, 25 Oct 2021 16:41:28 -0400 (EDT) Received: from imap46 ([10.202.2.96]) by compute6.internal (MEProxy); Mon, 25 Oct 2021 16:41:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=mime-version:message-id:in-reply-to :references:date:from:to:subject:content-type :content-transfer-encoding; s=fm1; bh=XrW+jXGtPoVs64BqVEwjkr1KJx VF+Jf/sdtcp2VyorA=; b=K+6vsbrwMqjZd9f6dF86BJzp3EXGnKqiry5WdCJIyO vORIV2NfEubQyXEAWtdxjoMNO/XT54s+bKfSZz5mq1fFb5D5EO2BjM/+CGJXU2kZ A5JKAH7PCG1Bkb2MDrrQyJpDJLPQrkBRwL5B2x/7H8mZ64xBhvfPcmT1z6NZ7skz gqhOFWLos6+LT/JQO4+R8cUnQU16Fs8UnYSItPjsk3HjCTCsd3w+Cm/UCMr6N+c5 DCoFZsnJtDGjQo326jqtQsyYRTkfyqY6InccABOAm5hWVNgKAcinMFACMQmH8zUP 9TELQvCnjaoFKIlq2H5O5H253DqpyvKocoe8zXlKtiGQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=XrW+jXGtPoVs64BqVEwjkr1KJxVF+Jf/sdtcp2Vyo rA=; b=eCMhgjKH+vsBKrqi/mBH8ACW3Hc0R/0MyKme7AmkgX/QTT1uS6m9ZYdkE DRgXopXnSpcn2/4biDitrm+vK8fbY0xNEeLQ95y60jBacvYCp7JiKT9MnA/9NCsN FfD/MAmu/sB0uANAAheVkWsU+NycHd46tWIdYtDbEHYBv8P70LpCjSnQ4SytBfmS hEb17xXhGnTnD6kbdhz+DojCCO6VqatWbZCyFn/H6flKOyfW7/jhflWlCGLGccvE NduAOh6+4chTCAEhfpGPteEtN1/Bs226TuogT+gfBNlAYp3ybF5AjuyRdRiEHCi5 Z20DmNsb/wJ3r5ORBdpF+1l5OaC5Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdefhedgudduhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgfgse htqhertderreejnecuhfhrohhmpedfffgrnhhivghlucfuhhgrhhgrfhdfuceougdrshes uggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeefhfekfe evieelleehiefftdekudejledvhfdtjedtgeegvdeuffefleehhfdvgfenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegurdhssegurghnihgvlh drshhhrghhrghfrdhnrghmvg X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 46F921EE0076; Mon, 25 Oct 2021 16:41:28 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-1369-gd055fb5e7c-fm-20211018.002-gd055fb5e Mime-Version: 1.0 Message-Id: <048e0b3d-6da9-4905-b1ad-253647cea0d3@www.fastmail.com> In-Reply-To: References: <20211025194508.GB8612@tarpaulin.shahaf.local2> Date: Mon, 25 Oct 2021 20:41:07 +0000 From: "Daniel Shahaf" To: zsh-users@zsh.org Subject: Re: Disabling null elision (was: Re: Most Recent File) Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Seq: 27291 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: Roman Perepelitsa wrote on Mon, 25 Oct 2021 20:02 +00:00: > I would be 99% satisfied with step 1. I would be less satisfied if > step 2 was implemented because I hate when my scripts break. Granted, > even step 1 will break "plugins" that attempt to work with any options > but at least it won't break executable scripts. In addition to these two categories, there's also plugins that set non-default options explicitly for their own use, and users who do that in their zshrc's and then post usage questions that don't start with a =C2=ABzsh -f=C2=BB. > 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? If a function f is written under the assumption null elision is disabled, but is run with null elision enabled, then it would silently do the wrong thing, rather than, say, error out. I don't see why a function's caller should decide whether the callee should or shouldn't elide nulls. I think the function's author should make that decision. > I do get your point about the difficulty of reading plugins when you > have to keep in mind all possible options that the code can be > evaluated with (how many plugins work with no_glob? mine don't). Writing plugins that are meant to be sourced by others is a pain, not only because of options but also because of aliases. Having some way to provide packaged code to others in a way that the code will run under predictable syntax would be nice=E2=80=A6 but that's yet anoth= er thread. (E.g., perhaps the new behaviour should be triggered by magic bytes at the top of the sourced file. Or perhaps we should start adding some directory under ~ to the default fpath, e.g., ~/.local/share= /zsh [plus or minus XDG base dirs support]) > I still think it's worth it to have *this* option. Dropping all those > quotes would remove noise from code and make comprehension easier. I > realise that few users would benefit from this. Not many write zsh > scripts to begin with and a small number of those would enable a new > option. Yeah. I assume that if we make this change, then once the incompatibility wave is past us (i.e., once everyone has made their code Y2k compliant, so to speak), the resulting language would be more intuitive =E2=80=94 just like it's more intuitive with NO_SH_WORD_SPLIT = than with sh's word splitting behaviour. Well, why not push an implementation to a branch? If you've got the tuits, of course. Cheers, Daniel