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,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2969 invoked from network); 4 Feb 2023 00:23:52 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 4 Feb 2023 00:23:52 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1675470232; b=eXvWx79Rwhl9kLxh3IhJu9rY14OvmHdNi1J2u22Z3DC3OAWCiqyBT+6y8eik4/VAIu8LZxvXhq GXBSoOW/2P0VTYG/+zGVcJzL+vnJx+qn3XhuSJdcJ2zzbzXGJO+58/C/gmsqFollG5tZN0SzT6 wOXjVPcZwIlTdYO5uVSzaO7uQDuj462+0nMA3th+XuiJJpC4GeFPZGYE8wtal2I62g1Zheh1yp Dwbcd3SnBncWK/HccBtg9WJNmmk8qzErq1/CKOaj1Nv7UqyE9MSyj20lc3pDQjbAvnrFVzK+HO Se4Q0KmYut1YOzueabHg0/hTfdasZSWkqx/lDxkPVdVOIg==; 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=1675470232; bh=DWmfU43ublnc8vaGrjGGaPPs79emWVf3rXlQKOW/nkk=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Subject:From:To: MIME-Version:Date:Message-ID:DKIM-Signature; b=GAcjCZIqXzbe/jDybllfiR1u8wvZAqtm9VdS1M+MLtl9mEZ0rEKCpRInF0hAz9qrJX/V//Xrhs lgWErX91pTG2n4u3PCukY/u5jqOPNARQ3scgrrZ0SsMTBZbV8YvOqcNjT5Qn+3+UcgVSau9UE5 lL4y0Yer8kbwplWuxVxe2ZZ9hlFmmAkomKfcNwhoiSHF0mYCIUygDN3x9G6VogmCLScrrHqFDg bGVcfjg/kYseeowjYMEB2BCHx5CCtUqf4k5+xkgiUrYorgR2qcR0Vf8JJetnoFAl95pWjpNvaB v6IKBKysJEXtUD1Wwu8wMMTsVpq/3SdTinXBZFXCUveVRA==; 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:Subject:From:To: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:In-Reply-To:References; bh=NAHxOUH0fxK1TTRjU74pxGGt+tRMs9wOnrtLMf7Xuac=; b=qNInGusOQ5aDJ1U9n8ComgCbGw 34uyUcT8eLm/fADzZ4Z6OkwZ7mFKMm3stLqMiYCmz2fCqRbq87duXAUv/XImV4HWEhtcoaaODtGvu +UlXJk3zE1GbgSZMjzttS6138AtJOthYD4AVODsqz4Gr53gx09zj1ly08yYIZ2T8MaNeg8yPDTwMl nKm3393sHAwu9FOgZRoPMQrMdgfRAiQDOqndJ5ed2ot5U3uGo2493J/H4wCJ5SYzgiApRoBm3JxBB Afg6dncxkXa4zscbb32wunBP95JhE08qmyMiJNJiLeVO3ZOwC3zO0TecE8ejHy806TYL8lTaa/5nM YlIXdRsQ==; Received: by zero.zsh.org with local id 1pO6LP-0008fJ-Tb; Sat, 04 Feb 2023 00:23:51 +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]:34944) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1pO6JV-00073z-BG; Sat, 04 Feb 2023 00:21:54 +0000 Received: from csp01.eastlink.ca ([71.7.199.166]) by mta04.eastlink.ca ([24.224.136.10]) with ESMTPS id <0RPJ00C744VC6J10@mta04.eastlink.ca> for zsh-users@zsh.org; Fri, 03 Feb 2023 20:21:51 -0400 (AST) Received: from [192.168.0.4] (host-24-207-18-108.public.eastlink.ca [24.207.18.108]) by csp01.eastlink.ca ([71.7.199.166]) with ESMTPSA id O6JSp3ksw6z6sO6JTpjwna (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Fri, 03 Feb 2023 20:21:51 -0400 X-Authority-Analysis: v=2.4 cv=bOzQYtyZ c=1 sm=1 tr=0 ts=63dda51f a=xN66ZtSbq5jdJYpBp7G/jQ==:117 a=xN66ZtSbq5jdJYpBp7G/jQ==:17 a=IkcTkHD0fZMA:10 a=BqM9uk2XsoljYg2642cA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudeguddgvddvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfvhffutgfgsehtkeertddtfeejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucggtffrrghtthgvrhhnpeevhedugeetieevveeiueethfffleehkeeugeehtdehgfetjeevhffgkefhieegffenucfkphepvdegrddvtdejrddukedruddtkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvgedrvddtjedrudekrddutdekpdhhvghloheplgduledvrdduieekrddtrdegngdpmhgrihhlfhhrohhmpehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgdpnhgspghrtghpthhtohepvddprhgtphhtthhopeerredprhgtphhtthhopeiishhhqdhushgvrhhsseiishhhrdhorhhgpdhgvghtqdgkihhprfgrshhsfigupehtrhhuvg X-Vade-Score: -100 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: Date: Fri, 3 Feb 2023 16:21:50 -0800 MIME-version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Content-language: en-US To: Zsh Users From: Ray Andrews Subject: color Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 8bit X-Seq: 28896 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: Bart, all: Trying to get  rid of the calls to typeset, I'm experimenting with variations of the second line here: ... VARIABLES+="${parameters[$1]} $( typeset -m -- ${(b)1} )" VARIABLES+="${parameters[$1]} $1=${(Pq+)1}" ... ... there are only very minor differences except in one case and that's 'color': 2 /aWorking/Zsh/Source/Wk 0 $ . v; v _v_a* color H     color = ( [00]=none [01]=bold [02]=faint [03]=standout [04]=underline [05]=blink  ... H     color = 'none normal bg-blue 31 bold no-standout bg-magenta faint no-underline bg ... Al    _v_abrev = ( sed -re 's/(^[^ ]*) ([^=]*)=(.*)/\1  \2 = \3/' -e 's/integer[ |-]/I/ ... Al    _v_abrev = 'sed -re s/(^[^ ]*) ([^=]*)=(.*)/\1  \2 = \3/ -e s/integer[ |-]/I/ -e  ... ... the second line doesn't show the parentheses around arrays and the way of quoting the 'sed' string is slightly different, but no matter.  However the 'color' param prints completely differently, and no variation on the second line changes that.  Also, the color/colour param seems to be the only variable that has this issue.  No other param shows what look like indexes "[00]" that way.  All printing methods I know of besides typeset -m show the second version of 'color' but it looks plain wrong, the typeset version is 'obviously' correct.   The untruncated 'color': 3 /aWorking/Zsh/Source/Wk 2 $ print -r $color none normal bg-blue 31 bold no-standout bg-magenta faint no-underline bg-cyan standout no-blink bg-white underline 33 41 01 blink no-reverse bg-default 27 no-conceal reverse conceal 30 31 08 39 02 32 24 45 35 05 34 30 39 47 black 23 red green 43 yellow 36 blue magenta 37 cyan 03 white 44 35 default 40 28 07 46 04 33 37 40 22 34 42 00 30 30 25 49 bg-black 36 32 bg-red bg-green bg-yellow ... completely strange.  Why is 'color' unique in this way?  Can I do anything about it?  Without 'typeset' the function runs 4X faster, so I prefer the second line above if possible.  Even simply as a logic problem  can't see how the two displays of 'color' are related but of course they must be.