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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 31339 invoked from network); 25 Oct 2021 20:06:18 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 25 Oct 2021 20:06:18 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1635192378; b=HYms/YmTDAgDnKNEdvW1wMZ8gcTXqVkD6UQs/jYOqTzsKCIUgc5I17oPtvmqgEJt6+ev1OdJiU 1b90QXFMYHNg0TdaFsLSG18Sfus58aifKQKlSmuw4HqeJixALTW36G5b28zvpPvHH53LTSwXPC bjiqlvLVSZrmrc59+ElK2aKDKbWvLqAd7l7zH064Ntf0Tk/mcwuww/UbAzY7d3XQDbiuzH+JG6 SM21FZx45/OQpSEmY4i2JjbSAp/6Dys5fOOISebXmNdVOqfi1fP1gXYXDzyK3PmvehxgDEG7xT jwJQtKLpz3zjP9dS2mKonOYRktx5MGxJNhVy407BJnYrOQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yb1-f180.google.com) smtp.remote-ip=209.85.219.180; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1635192378; bh=8r1jWQ9F4wZg46yomQ/zCLcSKI3cIzE+ohwYDyoexPs=; 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=PrIgKQNwSeEcWUwoF4792+yli/Rlu+rHbRF1sZiCoWbR1htdmJDPocknYJnnW4q2TGXTZ55m9i lIuPtnlTgkPRqyD25N1ED+ezXWqsMT1MeHFq1s414ZY50A0oJg+pZ54il5wKAUI7VxxowOmpNc ZsIIho3bXDT6dn+wYCSU2E7NVD2lINvcz2RIV/vm6bNouqTckPC11/5SZjg1MDpJT1jgiwz5P+ ETD7v1mHWNI0leCStUjafxKTIxJPxRZzJPPAySrhP0g6Kn6isT03ALD0AAXO9NSn+hjlZWK8cQ 6UzzK+kBMhlz1CjY1SzC+BAQt3OdjpaQ1YaMhwj/RLGifg==; 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=8r1jWQ9F4wZg46yomQ/zCLcSKI3cIzE+ohwYDyoexPs=; b=jBnkvRvhBCGygnGSj1GYTWGdKC +EhGzIs+4GB9QXxyZCLJsZmxdHHQfRY0r6kzw/hy8+tG5m8ClQnbhTZ08EUKYuK7CnLKglSM812mB K2Kegpt2LhU/LywYcqhtsH1Aa6f5vcRG4+8oB92+pym4gnMBux42kczoE/0gTyuuCRkR42uTs26zw fVQ67e7RW/Tgk7oOkOhvgFHd2jG9r8mjLGXalfLV/FIjW2dQbaKB6uKYKuKFkQu5t+NLAXzoQd8xE tOp02n1xA8t0uetfE9Z3YYnMAJGYXopnHldelGBTZWh4fEWwEPM8R6dbf5pA7qKo1yaAKyQbt7nKj ugFxT1ow==; Received: from authenticated user by zero.zsh.org with local id 1mf6Ec-000K94-1t; Mon, 25 Oct 2021 20:06:18 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yb1-f180.google.com) smtp.remote-ip=209.85.219.180; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-yb1-f180.google.com ([209.85.219.180]:35377) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mf6Du-000JQz-EY; Mon, 25 Oct 2021 20:05:34 +0000 Received: by mail-yb1-f180.google.com with SMTP id i65so28214401ybb.2 for ; Mon, 25 Oct 2021 13:05:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8r1jWQ9F4wZg46yomQ/zCLcSKI3cIzE+ohwYDyoexPs=; b=fQ/nb8bvU7qqljQ2DlJLGvadbILny4IEf8auH192/UJyQEz64nidgeJPJ1E5iyoMMc 7nmOK+LSOIhGvuyix0DxhbkiSiQEzx8tndMz7V6jFZn3/vTZpevQGeIGMdOcRmBbl9ZM B6ooUkk22YCZOyWkAehNmPFnOr0xavzyzYpqE5H2SJ/9byK5PhC0GldWxhtnWCd2bo21 lOsBmoiQP42SiIVM31O9fTa1zSxFBgOjtbvPg6oZlza+G2RUf+RcwElzsmEAHj4bfBxc KHP01VEPl/ZqCqnUAIPVAaYtR513ubo5/x8Jptki4SUwrvujxT9IU5CDxA4HpqDPYoaH U97A== 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=8r1jWQ9F4wZg46yomQ/zCLcSKI3cIzE+ohwYDyoexPs=; b=ABV0PjAYs+IeUZvQEMHnBZvXRs2vrQXgesWHE9Y68W+j90wIM6BWQeFwqP2ihYk3nB 7NOjbeygSemvmjCMT/3XIt+W+c9CXyGsd2GHKPGhhiXhdQY2BcGAkOQXX/2nFWztYun1 I4lW09DFQzn45lrQlBjPN04ggIPd2bTPqCXmlCXDhYYkV/H5g7ir15/yQTKHHgGwLr2R 71ROZizFb8DY1U024e4YVqTruHje26hxbH6J08kc1QVdRtHL7vK59GN9Aw1lEv/7A+lD Rkquf8MnrrchaH6WWxZpIHXvtFRpom6BmnTquyVXdWtrYICNjLZUc7n/VxOceKISMER4 Ls3Q== X-Gm-Message-State: AOAM531mJ14BMKXuo5QFRLDXQLGAo+qYvoyk2fd4cuSzXQadBMJGGzBf qkbOoiKCFYu/PFRQojM4cJukpFi2sbB1bR62n/HcsA== X-Google-Smtp-Source: ABdhPJwlUQJ1MwONWETQ8vjQQg83RowPjmwaVPhhRibOqz8C2D+59tMM3pkt1nXg6X3QlV36xeRsUWkChPDvriQ7Sho= X-Received: by 2002:a25:2541:: with SMTP id l62mr19585903ybl.365.1635192333429; Mon, 25 Oct 2021 13:05:33 -0700 (PDT) MIME-Version: 1.0 References: <20211025194508.GB8612@tarpaulin.shahaf.local2> In-Reply-To: <20211025194508.GB8612@tarpaulin.shahaf.local2> From: Bart Schaefer Date: Mon, 25 Oct 2021 13:05:22 -0700 Message-ID: Subject: Re: Disabling null elision (was: Re: Most Recent File) To: Daniel Shahaf Cc: Zsh Users , Roman Perepelitsa Content-Type: text/plain; charset="UTF-8" X-Seq: 27290 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 12:45 PM Daniel Shahaf wrote: > > Roman Perepelitsa wrote on Sun, Oct 24, 2021 at 09:22:46 +0200: > > > It's one of the nice things about zsh that you can use the shorter > > $foo and $#foo instead of "${foo[@]}" and ${#foo[@]}. I wish there was > > an option to disable null elision with a corresponding expansion flag > > to turn it on similar to no_sh_word_split and ${(=)name} Note there isn't a ${(=)name}, it's just $=name or ${=name}. > On the one hand, null elision breaks the principle of least surprise This is another one of those where it depends on who is being surprised. A person coming from csh would not be surprised by null-elision and in fact would be surprised by the opposite. > On the other hand, making it on by default would be backwards > incompatible, and making it off by default would mean there's yet > another syntax-changing option for everyone to keep in mind If we ignore the global option and focus on expansion flags, this becomes much less problematic; we could add a flag with this semantic ... but if you're going to need a flag, you might as well need double quotes as well.