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 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12841 invoked from network); 10 Nov 2022 18:46:24 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 10 Nov 2022 18:46:24 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1668105984; b=HPf/vJp1/mmbTKUkXRJPUmX2zYsHwCqHmOUCF1TrUvLJoIja3dL7enxQDSpb/fQ/vS1mFn8pEU yoxn2LzNz6gUYtZMmqZyil87nCruS4/gThA0dxVBTBFD8LuM6/jaM8V/JOg+G2Uto5zQAlR2XX 6WihcMbrgpg/EMwDum23ioOiq6kKJp0h4SVzeU13RRU9uLV0I/dvlCfurXi24Ndr7197cjyD8I YX018b+mrvKHeJtvzfR+shxLIqgac3d+yufOLBUCz2kCcsEzKB6RJI6iCCZ7Cc9YGRigEWz0rc rpWMuHsneXOMNuGDig+MhaEW3Qkaf5bbyS0uCuwPuM4L+w==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta01.eastlink.ca) smtp.remote-ip=24.224.136.30; 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=1668105984; bh=gc9M57lXsmRiHg5Y4G2uGe8elsvCsDvCu+viSqdJD7A=; 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:To:Subject:MIME-Version:Date:Message-ID:DKIM-Signature; b=oai3SN2TjI6Pz9RZKTI2gm6Ae2vdwQHGo47J/kLXdKcf8uVy0PDCcy548/6rq2scTvMFQ9kQjh jO5PCkpTex41fw4dT86kYcr8TjHBpjXPPoSqy4xHZix+MR/rQoUXOLai9s0V0Ku/BEr7DJOp8g 6FjdBV0bLV6pWvFK9r5EnYJh6asNeWglQXN/NQSM6aS0g7p5dQ+5IIsWnsiXkl8OL5UQYS46ue 46TNd0kRaFXvub3ScofmBLwe2sCF+y6jtJlM/1NDI/OOjmhBNygZRNa9xPIMvjS1RFthLb/h1e 4J52IuY5E/zlC23qiEEo2/uit4uiKwcxuzoDD8lY7Z0IKw==; 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:To:Subject:MIME-version:Date: Message-id:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=wRVlMleXpOIh8BZ7+DZNlxnIfndquI4CCDdzo+7b2m0=; b=plCf/IDIruLakUXDhhpzHl7/K+ qGOoEnZuU1zSbG/zY5qyaclDnqrGFSFk0cl2xWLZX2oH/rP8LnGggdeoQC3nsseWaG2diNQHWMVYZ zSgcMULWY7jLCojBGmrljEchh18SvGgkCWyuZXs8dSVn88zZ+grLkOW6qKo+37+Eg1o3NqmGxeqKT d2i7tFxsv1Qx8k6k964SHcUrPq8U5HpiGdrBOir0eJGZg9UpbmCzsncybGR3GitbglGvgKfhIJIDX /43MoRhbVGmI3Ais2pjYLZ2JL4M3FdWqLZ2K8sums9y225govAi7dLjjUiQJrXLiItUIjkPS+Pmzp +/rbODGw==; Received: by zero.zsh.org with local id 1otCZD-000318-Mo; Thu, 10 Nov 2022 18:46:23 +0000 Authentication-Results: zsh.org; iprev=pass (mta01.eastlink.ca) smtp.remote-ip=24.224.136.30; dmarc=none header.from=eastlink.ca; arc=none Received: from mta01.eastlink.ca ([24.224.136.30]:38098) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1otCYc-0002Kf-Jj; Thu, 10 Nov 2022 18:45:47 +0000 Received: from csp01.eastlink.ca ([71.7.199.166]) by mta01.eastlink.ca (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) with ESMTPS id <0RL500E594MVFJR0@mta01.eastlink.ca> for zsh-users@zsh.org; Thu, 10 Nov 2022 14:45:45 -0400 (AST) Received: from [192.168.0.3] ([24.207.18.108]) by Eastlink with ESMTPSA id tCYaov611kffJtCYbosFEE; Thu, 10 Nov 2022 14:45:45 -0400 X-Authority-Analysis: v=2.4 cv=Lbf6qBTi c=1 sm=1 tr=0 ts=636d46d9 a=xN66ZtSbq5jdJYpBp7G/jQ==:117 a=xN66ZtSbq5jdJYpBp7G/jQ==:17 a=IkcTkHD0fZMA:10 a=cDAQb1yfP846xTH5d8MA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrfeeggdduudekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnhepiedtjeffvefgtdehgefgteekueeggeeitedutddvvdduteetffdvveelgfeukedunecukfhppedvgedrvddtjedrudekrddutdeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrddukedruddtkedphhgvlhhopegludelvddrudeikedrtddrfegnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepreerpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: Date: Thu, 10 Nov 2022 10:45:44 -0800 MIME-version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: coloring substitution seems to eat next line. Content-language: en-US To: zsh-users@zsh.org References: <549715c2-8b36-8b7e-e3ac-cac02f43dd0f@eastlink.ca> From: Ray Andrews In-reply-to: Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 8bit X-Seq: 28359 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 2022-11-10 10:36, Roman Perepelitsa wrote: > Does that matter? I thought it was one of those situations where the >> dollar sign is optional. > It matters if cc is an associative array. Given that you've > (accidentally) used slice assignment with cc, it cannot be an > associative array. Correct.  Anyway that's good to know, I think I've only used an associative array once and not here. > I've never heard of slice assignment :( > These two aren't the same: > > cc[42]="foo bar" > cc[42]=(foo bar) > > The second is a slice assignment. Ok, I'll play with that.  Sheesh, the things I don't even know that I don't know.  Is there somewhere I can read up on that? > You can filter beforehand like this: > cc=(${(M)cc:#*$filter*}) > > This assumes that $filter doesn't have metacharacters. If it does and > you want to treat them as such, use $~filter. Thanks, I'll tinker with that.  It will be satisfying to be able to avoid sed ... come to that I just went back to grep for the filter and colorization because sed's separation character might just be part of a directory name.  These little things! grep is faster too. But native code will be best. > > Roman. >