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 7805 invoked from network); 9 Nov 2021 03:06:06 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 9 Nov 2021 03:06:06 -0000 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:Subject:Cc:To:From:Date: References:In-Reply-To:Message-Id: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=OUaocS+H8S6ayDCMbf8qB6b4kVpWxOZIXtnTa7mFSYU=; b=hmKYqHcm++TJNTvWC/B/2sA/UM AQvbRngGdgj/wt1dpxkg2JpRa6EiO/ujgQQ/VIc3cn3ROB/qfQTlQ8GR9z3pF8aq7bU2iO/oqIuil KqKeGW0RswK1FFOKhmLM3txuB8q75pDk9+Q3Wz9DDr0BDqNOtOFznbqmEWpylc1TF0aW3WvpKjb1c FAshsvB8I7KyJEYEYZTVU11idYD9N9+KtNpwxQ9Jyix8+fpnaJtwOqMwwihJzsNrfmE1teDxQKnJU F/QurpLMKA0asajMyL1iS9PFBgIzrSWYZpBE/tIfXd1QPtrJDXN7HDd5RUL3Io/cU/7XxiGmBmdRx cmay129g==; Received: from authenticated user by zero.zsh.org with local id 1mkHSW-0003R3-0n; Tue, 09 Nov 2021 03:06:04 +0000 Received: from authenticated user by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1mkHRQ-0002hV-RS; Tue, 09 Nov 2021 03:04:57 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 860DF27C0054; Mon, 8 Nov 2021 22:04:54 -0500 (EST) Received: from imap48 ([10.202.2.98]) by compute4.internal (MEProxy); Mon, 08 Nov 2021 22:04:54 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudefgdehudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderreejnecuhfhrohhmpefnrgifrhgv nhgtvggpgggvlhojiihquhgviicuoehlrghrrhihvhesiihshhdrohhrgheqnecuggftrf grthhtvghrnhephefgleeludefleehtefhhfeikeekvddtuefhtdfghfeihfetvdejteev heeiudelnecuffhomhgrihhnpehsohhurhgtvghfohhrghgvrdhiohenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihvhdomhgvshhm thhprghuthhhphgvrhhsohhnrghlihhthidqudduhedukeejjedtgedqudduledvjeefke ehqdhlrghrrhihvheppeiishhhrdhorhhgsehfrghsthhmrghilhdrtghomh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 2DE2221E042B; Mon, 8 Nov 2021 22:04:54 -0500 (EST) 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: <045dfcff-08b4-4a16-90f6-ad7867e1996d@www.fastmail.com> In-Reply-To: References: Date: Mon, 08 Nov 2021 22:04:12 -0500 From: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= To: "Zach Riggle" Cc: zsh-users@zsh.org Subject: Re: Compound Glob Specifiers Content-Type: text/plain X-Seq: 27333 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, Nov 8, 2021, at 6:03 PM, Zach Riggle wrote: > *(/) is the glob specifier for directories [1] > > [...] > > [1] > https://zsh.sourceforge.io/Doc/Release/Expansion.html#index-BARE_005fGLOB_005fQUAL_002c-use-of >From that URL, except immediately above the anchor (emphasis mine): Patterns used for filename generation may *end* in a list of qualifiers enclosed in parentheses. > It would then follow that *(/)/*(/)/somefile would match > dir/dir/somefile and not dir/link/somefile. > > This is not the case -- even *(/)/ (i.e. appending a trailing slash to > all directories) do not work out-of-the-box as one might expect. Since your instances of (...) do not terminate your patterns, they are interpreted as delimiters for grouping [*]. Another example: % touch /tmp/foo % print -r -- /*(p)/foo /tmp/foo Clearly (p) is not acting as a glob qualifier here, as /tmp is not a FIFO. That pattern is equivalent to /*p/foo. [*]: https://zsh.sourceforge.io/Doc/Release/Expansion.html#Glob-Operators > I've read through 14.8 Filename Generation [2] as best I can (my > favorite hack being the NTREF=reffile bit) but haven't found anything > that suggests how one might do this. I'll leave that for someone else, as I don't have any suggestions at the moment. -- vq