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=-4.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14035 invoked from network); 31 Jan 2023 21:51:21 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 31 Jan 2023 21:51:21 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1675201881; b=R3I13iuiXRKTtwkm3szwHVqpIhVLVwUt5xJ+3duQinuGJWhJZIH7uJbDyZKrwN3dorWbUXpGFn qny1nc6gyIxkRhSyGm6FjQqmGYjSVuVXXbWvZah56r6OD7NiioDvEzXLOzR4pEWEcbtujLNIVf vU7GiBP+JjytdGyQ90V5PYghrmPR/A4On5wsFJwf6tVDWh1WNGHCIiXrCrK4gfHtUfHGyyZrU5 JO8zPjfeXbzwMW/0AqYY8U79OQh5p+1F3/AfOYc98sfS6x4KokhKuMXSZb3JAYjA1VxCy3/DlU GcS3BSvMtzeWfnWp1D1Re32OgqLra7LU+KEplieDdpacvQ==; 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=1675201881; bh=H1nNTEJaI87LTDZJlbWy8Hq0cPDwZGPyED31zY3E3wA=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:DKIM-Signature; b=F1KHo0GFj8FABrhVXQJtiIyrXWuhJ05MaAMbhuH67vIlpB/AR5BTRIuJNQlKcBbr/FLt/AlPo8 J0adEocA+67QJsvhTVehOpU+1u6M4wEa4Wgl10SQ1T9F88UF9DSrrxePeacOL+STsXVTRjdhQo BCUe+HeiaYvhg2F6S4AVldfKNQximb5Zug6l1D/BN7slfiHvob4sOJK3K6c1E8z3Ni/qLCvLn1 cpSTU72+MGgU4O+D6fQhqmEnBOfPA0XoGWL5r5WIL2CrmywarCaSgmvBSotEWGvuaa+q8siKdp ZUS+0pm8RhxFQuzm/rxp2/RIbiXze5opetk2BDyCxK+/xg==; 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:In-reply-to:From:References:Cc:To:Subject:MIME-version:Date: Message-id:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=05a/BpM8SheBm8AndxO3PrR8fQ6+Zv7JBwErVIp/WQI=; b=kNm1kpflIjW3EI5DSeoaWWgyDX 6Uw88kprwQAedkEb3XfgemfK4PQXk6fr3jaEgtGJgZeKn2RCt5VbWRLae2fM5r6+j4josEYWhUdmN 3pCJhyP/bsdJoeMvwJYkg/IUmTOnWNh+9O4P/OOJlG1qO00vdspMKGRHAzKoTbulvqmOFVQD57qUJ 6oPVvturLyUdBuDiYcCdqNmRLwFGzhpKXnAq5yqrgdAdLXU5Z9rjwr1N0HDssGsTEEos5rK0EJfIL /cPcbHqQzodXK/L8nCaUBdzhJTLA17mb34PPk/kvzimtbLaP0IafRvgoNx9WfkxmEN/2F7obVYkX2 mgmxfjMQ==; Received: by zero.zsh.org with local id 1pMyXA-0000lb-Dy; Tue, 31 Jan 2023 21:51:20 +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]:36385) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1pMyWN-00004q-F9; Tue, 31 Jan 2023 21:50:32 +0000 Received: from csp02.eastlink.ca ([71.7.199.167]) by mta04.eastlink.ca ([24.224.136.10]) with ESMTPS id <0RPD00D17B4UWF81@mta04.eastlink.ca> for zsh-users@zsh.org; Tue, 31 Jan 2023 17:50:30 -0400 (AST) Received: from [192.168.0.4] (host-24-207-18-108.public.eastlink.ca [24.207.18.108]) by csp02.eastlink.ca ([71.7.199.167]) with ESMTPSA id MyWLpQBJDjOrIMyWLpR1Rp (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Tue, 31 Jan 2023 17:50:30 -0400 X-Authority-Analysis: v=2.4 cv=Kv6Lm0aN c=1 sm=1 tr=0 ts=63d98d26 a=xN66ZtSbq5jdJYpBp7G/jQ==:117 a=xN66ZtSbq5jdJYpBp7G/jQ==:17 a=IkcTkHD0fZMA:10 a=EV8AkrjUbeHfPjFryUwA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudefgedgudehhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfgtefuvffnkffpmfdpqfgfvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucggtffrrghtthgvrhhnpeevheetiedvieffffeghfeuueelffelhfekfeehkeffteefleetleehkeehteejleenucfkphepvdegrddvtdejrddukedruddtkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvgedrvddtjedrudekrddutdekpdhhvghloheplgduledvrdduieekrddtrdegngdpmhgrihhlfhhrohhmpehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgdpnhgspghrtghpthhtohepfedprhgtphhtthhopeerredprhgtphhtthhopehrohhmrghnrdhpvghrvghpvghlihhtshgrsehgmhgrihhlrdgtohhmpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: -100 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: <8a2bb99d-9ef0-b71d-f00f-96df346abc56@eastlink.ca> Date: Tue, 31 Jan 2023 13:50:29 -0800 MIME-version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: (j.|.) Content-language: en-US To: Roman Perepelitsa Cc: zsh-users@zsh.org References: <754f2048-2882-b7a9-560b-7c0564ac112b@eastlink.ca> <6240098f-7327-c73c-cbba-8bf4af5fce5c@eastlink.ca> <0810ab9b-ba5d-5b0c-1d63-a307573f1d22@eastlink.ca> From: Ray Andrews In-reply-to: Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 8bit X-Seq: 28879 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 2023-01-31 12:19, Roman Perepelitsa wrote: > > Do you understand what this does? > > print -r -- ${(ok)parameters[(I)pa*|PA*]} I'm afraid I don't, never seen anything like it before this.  But I'd better find out.  I'm sure I've seen the pipe char. as an operator.  Alternation, no?  But never in this sort of context. That would make sense: this pattern OR that pattern.  Above, obviously lower or upper case 'pa'.   Except that I can throw three or more patterns at the command so that would require another vertical bar, no? : ... pattern1 | pattern2 | pattern3 ... so if it only accepted two patterns I'd say that's it for sure, but it takes more than two.  ... but wait ... the 'j' ... I don't know where to read up on that ... is it perhaps saying: 'keep on joining forever'?  Again, I've never seen it before, but if that's correct, then that's the answer -- join everything.  So then the bar in the string is in fact an operator, as I suspected, yes?  Then '(I)' matches anything in the alternation string and feeds the correct index # into the machinery there which then grabs the appropriate name. Sorta.  Yeah, that's gotta be it.  The tree I was barking up, was that somehow the aa|bb|cc ... was being directly converted into aa bb cc.  No, the former is a huge alternation.  Yes?  'j' is the power in this.