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 31685 invoked from network); 11 Nov 2022 22:25:29 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 11 Nov 2022 22:25:29 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1668205529; b=I5gSvp7efOcGzVHcpabEgpP4HLt1k6OGEcB8YnHLpWovfXWWsXYf0UsR9kvgRjThPifCQUIDZS J+zl7A5atn2so4h4ynkwDcOjIbHdahZJZoS5yKzyFsjurI30SqVYAg/g8iMjS4RItkDZ9YigyZ KSESXfOOAVATNrfQQgCTNXmTEP8wjrIkhDAc6swHJzSJEvRJbudfJx/AxMazcjRGQmvS5vf/q6 VE4ekdJ1HgYi5cDKFn8zhoGJdD3xQKP1xtwqqAdHV4VhtzuXzmB+2tfr1i6yaFVk0P9NcdLhlg jVcm1Vdei+Nif2cnJtpOSZ+ZQ/+8gQvigwkSGbsCpZ7GSg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta03.eastlink.ca) smtp.remote-ip=24.224.136.9; 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=1668205529; bh=NsNQOvoGuE4P7FM/FGgfwz0lM3rZjnPbL7dJBbClnp0=; 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=lZpQuI/Z6rJ00IsqTEUG62fK11pU38NWaMaoeJh3ndyjQg7a7ptNie+L4fI7RPP4rAlu8IM7cV asiHvf3HEFFKPa2TG7s2MMUEyAlbpbLCa3ciLpk0ur1JRD+twoI2XWf+pv35Q1jmcQvuxWR+NE RZ/AnEv1r0sHxCZgXFLp2gFyS/SwFYGfV+1ubY3/BKawCijtnn5T5a0k1MRpzODFVrJbo/ADxC 9+JlUShDKGieYMBTrtWB2bRiBPosescYd61VY8tM2+YQu6F6g1CuM+tVaOR2Tk4rwRISdwBQ8t H8+AYL81GBg43VT2z6u2/3u1Z9tAabqOzSFhoYDODKyLBA==; 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=XGizSlGba9D/N/4k3JrfYI+ct/O6tZkw2YCzeSlA5gE=; b=U8MVcvqd/qMliURZqc7HsIHngs v59uOjKi9dP4mYAzozh7YyrAeurNNdwol6lYHpgbLGTNwq/U2knqVQ92Yg00wwRbXgvJpwYeg1ipK aivGAhL6oqtdLYiAiB5xKZHkvNCvl6NEXKZPHV3T6YVSCY/3hjBHvBGfOCJW/QhFFbmZtd5U1c0Sr 23KKTuvva/qpThnvQK4j2EPv8lEqPgRuJJlGwNtexzmW4BFwzRwtRe2yis0T4db9SE+N3cKESKm/Z ZtEuWgCPBvxKLO7SsIJzOKvjo8tbbD5KvcHyld/kE+NIkTv35QSZ0R8XMUV0YIkKMk8E/hwSn6Oqf LZVgzElA==; Received: by zero.zsh.org with local id 1otcSn-000Er7-G1; Fri, 11 Nov 2022 22:25:29 +0000 Authentication-Results: zsh.org; iprev=pass (mta03.eastlink.ca) smtp.remote-ip=24.224.136.9; dmarc=none header.from=eastlink.ca; arc=none Received: from mta03.eastlink.ca ([24.224.136.9]:34411) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1otcSA-000E9V-O8; Fri, 11 Nov 2022 22:24:51 +0000 Received: from csp02.eastlink.ca ([71.7.199.167]) by mta03.eastlink.ca (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) with ESMTPS id <0RL7009VIEX59DW0@mta03.eastlink.ca> for zsh-users@zsh.org; Fri, 11 Nov 2022 18:24:49 -0400 (AST) Received: from [192.168.0.3] ([24.207.18.108]) by Eastlink with ESMTPSA id tcS9o6LmWgfyjtcS9odKte; Fri, 11 Nov 2022 18:24:49 -0400 X-Authority-Analysis: v=2.4 cv=M9uLaQ8s c=1 sm=1 tr=0 ts=636ecbb1 a=xN66ZtSbq5jdJYpBp7G/jQ==:117 a=xN66ZtSbq5jdJYpBp7G/jQ==:17 a=IkcTkHD0fZMA:10 a=VZyKx_klb90948tRvUUA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrfeeigdduiedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnhepiedtjeffvefgtdehgefgteekueeggeeitedutddvvdduteetffdvveelgfeukedunecukfhppedvgedrvddtjedrudekrddutdeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrddukedruddtkedphhgvlhhopegludelvddrudeikedrtddrfegnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepreerpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: <6042df79-449b-93fc-0d2a-dc990b552c70@eastlink.ca> Date: Fri, 11 Nov 2022 14:24:48 -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 a substitution Content-language: en-US To: zsh-users@zsh.org References: <5454df12-02c6-75b5-e552-c486e231183c@eastlink.ca> <1b44b09a-ebae-a45d-a19d-c83e1ce68f65@eastlink.ca> From: Ray Andrews In-reply-to: Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 8bit X-Seq: 28376 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-09 00:19, Roman Perepelitsa wrote: > Try this instead: > if [[ $scope_msg = 'BROAD' && $dirname = (#i)*$~1* ]] || > [[ $scope_msg = 'Case INsensitive TAME' && $dirname = (#i)$~1 ]] || > [[ $scope_msg = 'Case Sensitive WILD' && $dirname = *$~1* ]] || > [[ $scope_msg = 'EXACT' && $dirname = $~1 ]]; then > That's in place Roman, works identically to mine and I'll keep it on your say so, but what are the fine points on why your lines are better?  I understand the '$~' now so that's accepted.  As I now have it: NEW:     if [[ "$scope_msg" = 'BROAD'                  && $dirname == (#i)*$~1* ]] \     || [[ "$scope_msg" = 'Case INsensitive TAME' && $dirname == (#i)$~1 ]] \     || [[ "$scope_msg" = 'Case Sensitive WILD'      && $dirname == *$~1* ]] \     || [[ "$scope_msg" = 'EXACT'                  && $dirname == $~1 ]]; then ; # Do nothing, we have a match.     else cc[$aa]=    # Kill the line, it does not match.     fi OLD:     if [[ "$scope_msg" = 'BROAD'                  && $dirname = (#i)*$1* ]] \     || [[ "$scope_msg" = 'Case INsensitive TAME' && $dirname:u = $1:u ]] \     || [[ "$scope_msg" = 'Case Sensitive WILD'      && $dirname =~ $1 ]] \     || [[ "$scope_msg" = 'EXACT'                  && $dirname = $1 ]]; then ; # Do nothing, we have a match.     else cc[$aa]=    # Kill the line, it does not match.     fi > If this works, consider using more traditional names for these cases: > > - case-insensitive partial > - case-insensitive full > - case-sensitive partial > - case-sensitive full I'm having fun experimenting with these terms and no one but me will ever  read them so I amuse myself.  I like 'exact'.  'broad' is useless.  Yeah, 'full' and 'partial' are more standard and perfectly clear. Tx.