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, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 20374 invoked from network); 28 Jan 2023 16:47:41 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 28 Jan 2023 16:47:41 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1674924461; b=PPr81yDt/l8WYQk0nEYeMsxCV3NgbBnn+4EJWmXRkv7SsVRIF7ttlSzLLdabFIMlTkyBb59AYn 9BPnufhnpMh4dM3YyzcvkE9BU6rEUKHbqowem/vclRgjyyqoRP11qCE9cUJkdQAucSpsLGpoLV RiIQWHK8fdBA0u1b60ZLBZ88HrH1i7l7cOouJgM8CBVvMtZCZ10WuJ7Y2ktlgEpxOXmpEnDyXU 61ZS2PU7CIYERvb50QTFg8X5Iy/o2tmG3bBMA3mBV00HIAWNdIhiho8lNlfQ59YwRhLlaeI41Z XdmbUsvuHHe0u1WAU4+bsLDL0PN6Oh82X0s0cSvYvEjjEg==; 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=1674924461; bh=QLjlnt8u0rUAbGQATwZrM1LA+xZpS1DMEgj+Omr1fIc=; 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=JTGRToFrV/k8GMc4bYobFp+EZbGeR59D2uORwMMUeyzMwjRrP8Hik3zAcDCc6Eo5v72HjG0vwo HHAzrLeW3tC6AlIi8wmLBI34Tlac7lbHgIZH1qRg9IwWRTJ5EIU6gfGG38na94eBaE8B//F38p 0+j+0jizjZnV2N9O5Eqclzs0qR9mWQIhtWHmS++88E08ncYxCMONbre13rqznN9lY+mnCO0wZB FXO+xuO6Z8sscGVJF2+kDA5tXnmKni89/h32SKOPY1SGo90EyHlU81YRiPA0EbLOL7pbm8xZf4 yp0O8mpYTEs+EG+LzBt3uCrIuDkLvBLx7Lfbb3r1zVbhWQ==; 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=jtLvDPXodwIHrvGzSZzKktJMNkzyGVXOtAXYUfxHaQk=; b=MOSBz7WB96MaTu3hUHmypP74/c DhC5OEqttfXRpZz6u2/mm1gZ0dZWHYbDP0sMi03v4t+SmOuvVAGpXM7Gex+JEymOjnR6jo0MO33aG jiuBP9xGC7e0q/8OTuTsNO4hKaBjp7GDDUDpQJdUq983qr7Au7NidA8MIyHd1MoQ6pmdRy2levjGf jNa6jQ2GGH/Y7Y8crFLicya+6WNRaGcoUCgc6qneiRbYZNtrCLgkcNbEsy610Ql2Q8aKyZDumdlKT Tpkd8EvnER64cW/NoBK/17uZ2bUX/1r5ERctcza+QGEPOHCBdVUu1qzK+Ko4po5xijGn4DXylvkmu 6ZPrBSYA==; Received: by zero.zsh.org with local id 1pLoMe-000LCt-Om; Sat, 28 Jan 2023 16:47:40 +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]:35236) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1pLoHT-000K3L-DD; Sat, 28 Jan 2023 16:42:20 +0000 Received: from csp02.eastlink.ca ([71.7.199.167]) by mta01.eastlink.ca ([24.224.136.30]) with ESMTPS id <0RP700BU7FBR7110@mta01.eastlink.ca> for zsh-users@zsh.org; Sat, 28 Jan 2023 12:42:16 -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 LoHQpGdSvjOrILoHQpP7mZ (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Sat, 28 Jan 2023 12:42:16 -0400 X-Authority-Analysis: v=2.4 cv=Kv6Lm0aN c=1 sm=1 tr=0 ts=63d55068 a=xN66ZtSbq5jdJYpBp7G/jQ==:117 a=xN66ZtSbq5jdJYpBp7G/jQ==:17 a=IkcTkHD0fZMA:10 a=jpkSDPmqDAq6Tjrp7LgA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddvkedgleduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnhepiedtjeffvefgtdehgefgteekueeggeeitedutddvvdduteetffdvveelgfeukedunecukfhppedvgedrvddtjedrudekrddutdeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrddukedruddtkedphhgvlhhopegludelvddrudeikedrtddrgegnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepreerpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: <8f626e62-312f-06fa-d073-5910d1aba3ad@eastlink.ca> Date: Sat, 28 Jan 2023 08:42:16 -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: path PATH To: zsh-users@zsh.org References: <0dc71450-d082-93da-52f8-d4e6b97199af@eastlink.ca> <2f2c3ae4-ca4e-8101-5934-9eb493ff61cd@eastlink.ca> <30292878-d596-75cb-8dc3-f64f9b82a44d@eastlink.ca> <3ea702de-f818-adbb-c55b-e585f8deb10f@eastlink.ca> <1a232406-ad76-b661-496b-974ddf8e67fe@ckhb.org> Content-language: en-US From: Ray Andrews In-reply-to: Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 8bit X-Seq: 28838 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-27 19:47, Bart Schaefer wrote: > typeset -ga VARIABLES=() > All of these are going to obscure the types of any variables in the > surrounding scope that share those names. That's one reason I was > careful not to use any locals in my function. I noticed that.  The only 'local's shown are the funcs internal ones.  Could give 'em names unlikely to be used elsewhere.  I've seen that sort of thing.  Or is there a better way?  Given the branching and switches, I can't think how to do it in one string of pipes w.o. intermediate variables.  And variables to hold the switches. > >> print -rl -- $VARIABLES | sed \ > Does this do the right thing if you have a variable named $scalar (or > $array, etc.?) I take it for granted that my colorizing and various condensations and formattings are always going to leak, but they're not mission critical just efforts to make things look better most of the time. When I find a leak I patch it if I can.  Still it's a good thing to do things in the most robust way of course. > > It'd be better to convert the value of ${parameters[$1]} as you find > it, rather than build the whole output and then rewrite it. Well, the paint isn't even dry on that effort I posted. Improvements most welcome.  As I have it now, it's just sequential thinking -- first  get the core functionality, then add the switches (case, etc.) then massage the output.  No doubt it can be handled better.  It's C- coding. Anyway the whole exercise is just a 'cry for help' -- typeset -p (or typeset -P) should give us full disclosure.  display-params() should be hard coded and, IMHO, accessed via a switch to typeset. Wiser people disagree, but that's my two cents.  Nuts, there's already, what? three or five functions that sorta attempt to display this information but none of them shows it all.  Seems to me a full listing of params with *all* attributes and values is core functionality. And the doc should discuss *all* the attributes in one place. Every last one. :-)