From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id 069C0220AF for ; Sun, 14 Apr 2024 19:22:47 +0200 (CEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1713115367; b=VYqoAX4BkCqmZzDFaU0X7M3yjhvegJ2pxCFdOf2LWyest2nb3rvo7GIxDubU/3T+FN6XdTLonx gIgEvF2LFhwl8TAgc9t9z0LRHCXit/CDzKPNkEDimkEudZr34HL9qt0r7QNQ5PVUos/0VQnCkM P1SACpRQPbEXRyPx0Fy06hgue4/dRder7LOqNxQ9r9BByJlArt6MPHF760lbkJjse2R2AFdsKu LuiPMK6g000EOthnQadCfmcOwXG4w5NgmeVIb6vJsIbOS0DrXuO5h5Z44K52Vb1p2eDNA6vnvs l4XaUjseLS+FC4+nEcip8FZZBKBanvBmmZbxdwBHcusdFA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta04.eastlink.ca) smtp.remote-ip=24.224.136.10; dmarc=none header.from=eastlink.ca; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1713115367; bh=x9KBiexq6pt3UWMsyFrRd5KbCG8fduogpqtJtfmSVXo=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Content-Type:DKIM-Signature; b=qaE4q9kd+UXZwxd80sT6gB0JJwN3T1TSgh/4kMpkZCAiJ/h4fwwqDsXP1c5E9ScdEPMNnJbJWw QpB18IBuaKpNWZoilsJXDba0cl/HdaUJ1CZIDHI5BmSI+lcd2pM9UKdxMGIACz0FiU5ghwZctm 0y+yrorKse9BEKC8J/Ikj7D4gt62WiBDd9jzOo9llf/Yx8mUeT2283nBJ7+h9lL2f3u7heOUhO vdyaNUXph5798KfzsHjDG1nMS6J7Tl/zjPfALNvzrRPUza+FQpMTyyyCe+uyhi2cPCs3QAkdBn iRzTqRKpwOTBmUT2CNTTHIKRGvQjyGmA4db7n7/uY518pg==; 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:In-reply-to:From:References:To: Subject:MIME-version:Date:Message-id:Content-type:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=URQvfOQTgwjZAOFoUJGbQ5iGl9vEXw3ZS9XleFHkeUU=; b=EfIbwE7ETZiqLGo66x1DQ7FIYC RWS7rwKzk161af042jxhl7Cs5zIC5oGljg/Y52FH5lNp2VMGA0xOL+EcOe42GBXq4C/3Yj8CZhTT4 EgJIl9EW3p2QdLzpIw28QvGJUuGDWDOtSd4UmjLggVKsFS6SkMd3eMBEOt55TC9QyihKpOrX2Sc1l yMXBhNBaLrb3gvJAKumSKR08yGMOTw1NdC7akOENN7OR1abK/l1XimhGt45+YThy4vde/p+R9v+38 fVOBHPlaQNFEGgDbUKQik3D0rwwp908aX01YbxbO8bHtsNzAjOvTMCHn3rGQW856KnZ1PqdtDB5Og 8skrZ1VA==; Received: by zero.zsh.org with local id 1rw3Z0-0003aY-70; Sun, 14 Apr 2024 17:22:46 +0000 Authentication-Results: zsh.org; iprev=pass (mta04.eastlink.ca) smtp.remote-ip=24.224.136.10; dmarc=none header.from=eastlink.ca; arc=none Received: from mta04.eastlink.ca ([24.224.136.10]:40047) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rw3YK-0002tF-74; Sun, 14 Apr 2024 17:22:06 +0000 Received: from csp02.eastlink.ca ([71.7.199.167]) by mta04.eastlink.ca ([24.224.136.10]) with ESMTPS id <0SBY0MBMN054EXI0@mta04.eastlink.ca> for zsh-users@zsh.org; Sun, 14 Apr 2024 14:22:03 -0300 (ADT) Received: from [192.168.0.11] (host-24-207-19-13.public.eastlink.ca [24.207.19.13]) by csp02.eastlink.ca ([71.7.199.167]) with ESMTPSA id w3YIrjodd5Tsrw3YJrEVxm (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Sun, 14 Apr 2024 14:22:03 -0300 X-Authority-Analysis: v=2.4 cv=deIj3mXe c=1 sm=1 tr=0 ts=661c10bb a=e7T7DzMKK1R988ZCg0wLyw==:117 a=e7T7DzMKK1R988ZCg0wLyw==:17 a=r77TgQKjGQsHNAKrUKIA:9 a=gir0-LH0AAAA:8 a=hyJpQuif-H3mC6Ej7N4A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=pGLkceISAAAA:8 a=f7rFIdXGiYdcEq6LRw8A:9 a=8H3kWWkXoksSciJN:21 a=_W_S_7VecoQA:10 a=lqcHg5cX4UMA:10 a=aLewGyoHDmJ4ULJHWpSz:22 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeiledguddugecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfgtefuvffnkffpmfdpqfgfvfenuceurghilhhouhhtmecufedttdenucenucfjughrpegtkfffgggfuffvfhfhjgesrgdtreertddvjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnhephfettefhveeguedvleeggfdvvedufeeuudffvdfgledvvdfgtdeigeeuueelieefnecukfhppedvgedrvddtjedrudelrddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvgedrvddtjedrudelrddufedphhgvlhhopegludelvddrudeikedrtddruddungdpmhgrihhlfhhrohhmpehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgdpnhgspghrtghpthhtohepvddprhgtphhtthhopeerredprhgtphhtthhopeiishhhqdhushgvrhhsseiishhhrdhorhhgpdhgvghtqdgkihhprfgrshhsfigupehtrhhuvg X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Content-type: multipart/alternative; boundary="------------LPu7hdaD9zovn0Yx2fLVW5U0" Message-id: Date: Sun, 14 Apr 2024 10:22:02 -0700 MIME-version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: triviality regarding $# counts To: zsh-users@zsh.org References: <97793422-1543-4ba6-b52b-ff93eba03ab1@eastlink.ca> <1e53a3f7-9bdb-45ae-81c7-7d0ec1a6a541@app.fastmail.com> <3cc19e86-e953-4e2f-9e57-30ff84f15fdf@eastlink.ca> <0a0b9ec3-4661-4386-9fbf-b3152a46001e@eastlink.ca> <9416dc0a-3e41-4229-a9e1-239411ab3c17@eastlink.ca> <4a1e027c-a9d8-4306-bf3b-e1282914644c@app.fastmail.com> <4e9aa98c-9b5d-4e22-b7fc-8c50a9af9ada@eastlink.ca> Content-language: en-US From: Ray Andrews In-reply-to: X-Seq: 29829 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: This is a multi-part message in MIME format. --------------LPu7hdaD9zovn0Yx2fLVW5U0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024-04-14 08:51, Bart Schaefer wrote: > On Sun, Apr 14, 2024 at 6:24 AM Ray Andrews wrote: > The trouble with that "doctrine" is that what is surprising is > subjective and context-dependent both in usage and in time. When > these decisions were made, the largest number of zsh adoptees would > have been more surprised by having empty elements kept than removed. > Mysteriously receiving error messages like Absolutely.  It is subjective therefore a design decision, not anything like right or wrong.  I think the 'no negative options' rule is more objective tho.  Still, even recognizing the rule, there will be exceptions and maybe this is one of them. > ls: : No such file or directory > > would have been the surprising thing. Further, many commands neither > understand nor do anything useful with empty string arguments, and zsh > was intended first to be an interactive command shell and only second > a programming language (just a better one than BSD csh). That might be enough to close the case.  When I think of my data arrays it doesn't occur to me that 'ls' is going to receive it's arguments using the same rules.  Yeah, I've run into that -- piping array contents to 'ls' and having it barf at a blank.  So even as a theoretical discussion, what I'm suggesting would have to be unique to personal data, not arguments sent to ls ... but that might not be possible so ... I loose.  Or ... the speculative: 'no empty elements' flag would have to be applied to all utilities.  Anyway it's just philosophy. But this morning's mixup is cured.  print might take "  \n  " and give me a new line but as far as "  ${(f)....}  " ... is concerned they are not the same thing and "  '\n'  " will not be removed but "   $'\n'   " will be removed.  I get it.  And in an assignment, it's spaces that delimit elements. Hard spaces will be inside ticks or $'' . Thanks for everyone's patience. --------------LPu7hdaD9zovn0Yx2fLVW5U0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

On 2024-04-14 08:51, Bart Schaefer wrote:
On Sun, Apr 14, 2024 at 6:24 AM Ray Andrews <rayandrews@eastlink.ca> wrote:
The trouble with that "doctrine" is that what is surprising is
subjective and context-dependent both in usage and in time.  When
these decisions were made, the largest number of zsh adoptees would
have been more surprised by having empty elements kept than removed.
Mysteriously receiving error messages like
Absolutely.  It is subjective therefore a design decision, not anything like right or wrong.  I think the 'no negative options' rule is more objective tho.  Still, even recognizing the rule, there will be exceptions and maybe this is one of them.
ls: : No such file or directory

would have been the surprising thing.  Further, many commands neither
understand nor do anything useful with empty string arguments, and zsh
was intended first to be an interactive command shell and only second
a programming language (just a better one than BSD csh).
That might be enough to close the case.  When I think of my data arrays it doesn't occur to me that 'ls' is going to receive it's arguments using the same rules.  Yeah, I've run into that -- piping array contents to 'ls' and having it barf at a blank.  So even as a theoretical discussion, what I'm suggesting would have to be unique to personal data, not arguments sent to ls ... but that might not be possible so ... I loose.  Or ... the speculative: 'no empty elements' flag would have to be applied to all utilities.  Anyway it's just philosophy. 

But this morning's mixup is cured.  print might take "  \n  " and give me a new line but as far as "  ${(f)....}  " ... is concerned they are not the same thing and "  '\n'  " will not be removed but "   $'\n'   " will be removed.  I get it.  And in an assignment, it's spaces that delimit elements. Hard spaces will be inside ticks or $'' . 

Thanks for everyone's patience.

--------------LPu7hdaD9zovn0Yx2fLVW5U0--