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,NICE_REPLY_A,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 1595 invoked from network); 29 Jan 2021 19:53:10 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 29 Jan 2021 19:53:10 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1611949990; b=UwEdgX9eS92HlFacMBGjSWD+t5nmTKSH57gsDubAA/vypegN030RWdfRh/2ByWZvtPXrYBMLm0 PIUOzpZyC/tnq/z2raTTd5GScjsAPEI92QgUGCq61ijqDur8CYXvh6WiKpN2SLPTUOMJyCm0OA XpHFdNkErH3cJ/NTWC1pTlkMILnQuBNLfMmhD6H8aG6kdRA3/3P0U+fFMFAjqnYGorbAuVw/vX wZPkddIFcvZxCPrEB4bj5hLjgC41Trl0sytNUYQW2gj0Z3AZoDAGId1wuO/HDFCkils+oTwLtm EAHkavIgTKFx1/w+L2anuuXDUN+rH97c4XepVn8iLgc8DQ==; 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-20200801; t=1611949990; bh=52t8PKmxyn0HJE3l5F4CnMNx6qjXCX+GHkzy1gJwbP0=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:To:Subject:DKIM-Signature; b=KVFZ4g0bdf2YRQtCPFmElZu6WSUT6S1TPKb4cFqTX6RVuXUDp3gBBbtx7vhMO3hLBsYcCe2Bhw zSNvnHkpc2hUzqe894a2EzeL2O4FVsP13gRQgq6jqAAdPsC/Ma89cj4GsRGq8Bk3x7VFaGEqLa Q/lo69N/bS99D0Lxl/+mEV7k1nCT+zxQ8Z7iyHpCwmb/+j72l/DqJ7fqkZZN7l5U5phdbDG7Or LQneHkiaWhmbGrn4XTpFVrEhesO8gLmsIfAQZxAEvw9qZ7uRj4KkBfRGNNae+t9ASr2nZQHF0/ yXjPuvgs57GkTWoS/BAZJm3lSbEpUmHvuEKAzrgp57CNUQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-transfer-encoding: Content-type:In-reply-to:MIME-version:Date:Message-id:From:References:To: Subject:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=x4KajLZMBNsGDQTgwFbTmugjF6HYSZDpY2L6w6E/JLY=; b=ctm4RiFcQWMW6wySRNA1tndZgS ZabiYtnhVAHILioMn6wVxICMMpjhc02hy7ocVT0ZeOtwYTv9Fz7NElzNd+rzDBHYC2FVi2YPyoGmh Oxl7OHdI8iVxBCBJcKqEiArSBo7oZNXgKZdjwsrADdYGcXnoFlW/cyGje3I4sF/7YUY7aUp5ESHqg dbjaOmZeFSgMVqoHM7pggZkmZ1K4KkM2MSFQTFa4I71uulvQErv8PcCFfxkiSmwH3tD4WcmUzAMaw gox3UxJhxMhQlWx5NpJ9f14RlANPnk6BT4SoMqvxahkVtmfDFkcaGeK53Dcb2rRQa0ELXow5k1GuB iGcUTm/w==; Received: from authenticated user by zero.zsh.org with local id 1l5ZpN-000C0J-Tg; Fri, 29 Jan 2021 19:53:09 +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]:43863) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1l5Zoq-000Bdk-7C; Fri, 29 Jan 2021 19:52:37 +0000 Received: from csp02.eastlink.ca ([71.7.199.167]) by mta04.eastlink.ca (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) with ESMTPS id <0QNP00CI9GTIC4K0@mta04.eastlink.ca> for zsh-users@zsh.org; Fri, 29 Jan 2021 15:52:34 -0400 (AST) Received: from [192.168.0.2] ([24.207.90.194]) by Eastlink with ESMTP id 5Zoolj7lenkRC5ZoolQJGa; Fri, 29 Jan 2021 15:52:34 -0400 X-Authority-Analysis: v=2.4 cv=B+J8bMhM c=1 sm=1 tr=0 ts=60146782 a=zv49KfEsxEDzuN5AGO7r0Q==:117 a=zv49KfEsxEDzuN5AGO7r0Q==:17 a=IkcTkHD0fZMA:10 a=K_os-2JzMeeH4vDgXgQA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedvgddufeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnhepkedvueeuffefhfdvueeiteffvddtvdejgeeujeekieduheeiteeiheegtedvhfefnecukfhppedvgedrvddtjedrledtrdduleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrdeltddrudelgedphhgvlhhopegludelvddrudeikedrtddrvdgnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: 0 X-Vade-State: 0 X-EL-IP-NOAUTH: 24.207.90.194 Subject: Re: (N) defaults to whole directory listing To: zsh-users@zsh.org References: <7ea3f3f8-6aa9-bbab-40d7-2944b88e1709@eastlink.ca> <7ED923BE-3073-40F6-956A-B81FABC6F2B2@larryv.me> From: Ray Andrews Message-id: <7c9ba2d1-d1ab-fe0f-7ce0-2141e5ab04fe@eastlink.ca> Date: Fri, 29 Jan 2021 11:52:34 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-version: 1.0 In-reply-to: <7ED923BE-3073-40F6-956A-B81FABC6F2B2@larryv.me> Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 8bit Content-language: en-US X-Seq: 26440 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: Archived-At: On 2021-01-29 9:52 a.m., Lawrence Velázquez wrote: > mkdir -p foo/bar{1,2} && touch foo/bar{1,2}/baz && cd foo Ah, right, I need 'ls -d *' to mirror plain 'ls'.  Anyway the point remains that ls has no way of knowing that zsh has removed the argument thus there is no failure to report. Have you considered using "setopt CSH_NULL_GLOB" and then not using (N) ...? To avoid surprises it seems the ' 2> dev/null ' is going to satisfy. In unnecessary detail what was happening was that in my wrapper I'd get this: 1 /aWorking/Zsh/Source/Wk 3 $ l zzz LISTING of "zzz": all file types, INsensitive. Sorting upside down by: Mod. Time: drwxr-xr-x 10 20480 [2021-01-29--07:08] ./ Items found: 1 Total bytes in this directory: 2.8M Total including subdirs: 12M ... there was always that annoying false find of 'dot'. But ' >2 /dev/null ' fixes it. BTW the 'Items found' comes from using 'wc' but that too reports one item even if the output is zero which seems strange but it's fixable: 1 /aWorking/Zsh/Source/Wk 3 $ . l; l zzz LISTING of "zzz": all file types, INsensitive. Sorting upside down by: Mod. Time: Nothing found ... so all's well.