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 6459 invoked from network); 22 Jan 2023 14:17:53 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 22 Jan 2023 14:17:53 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1674397073; b=HIrAPM/Em05g3ApO6fWpzCWa04+M2sL4U+E1/iQSctmGFjgVsdnsOsi8StH78TTPWv4bH5CwDO fh7L99hITfhZwTOmQh4/bakq/Lt5owwc/n8DMhuuUXDUF1q6UVbsG4RCYNRIa/AU4AwvHAxh0a vFASVpxgokbvdQUCj2COzudh1LiksuOoxUv2BbFVPyTH7Ejn2OWC9aKh0lAazXTDclUU3/Kec0 HUpWp2yZSIQFzlJEJdH2kOvb4XfiPTFbmmtRuQkM/aaLg8XoPKtm9RJSEOr+XdFkwVQpREMn4Z efuIOpuADBHeezgBDg0m0JMX2bWbS7DIlwEIyb3IHRMUqQ==; 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=1674397073; bh=Va6M09rUDAYkf5FO2beDJR1vHiwCsyFK2E7CUbfxw1E=; 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=GiwmxjjEHoHQktnaB+vGKmBnzidyKtpu30TlP0qlx/bZ8lLw86igT503drxBifwkvmPQpVSstI zl8mv3E6z8POAtaQCu7x0ACHR/D89J+AwON5uff4CV4uWE72WXqrvQWTQs8N5YkQPPPncAHMzi J4j9zSO3G/CRk5VEst0uhABpipYbPopHEKeJb+ooi65H7QuQS2UWSQ0tDGa7+G3nILRiD3HVWr 6uRqLIs3EhoHkQ8VgRIpWSHj7SXSJAa6j2DxU6V5LmZ6UWVDoxw1esjsrPPQPHZbZG9AUTHEnq tkwkAvETyunEFnPSObPP6/t0eE5swUKRY/w+bRQf7Hy3xg==; 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=SPQ4OpC6l58cHU2Viw6wmqmfZBtBjvIGJPjV1YIP5Hc=; b=PqRghojJBhrHyV2QxLTk1rb9ya D9hMcz1xHm7SdZs/w8uDh49H/eUyugA1VexvTF10NQys3oCRmdCSIO3BCv2EkcYyQeeR8LETS6Ykp zb2ONuQZCS5NWk6ubWZpPN4yblGHqW4ceso+p0Z3xNTSzZJtN8wDBxxTHUzbnO8yko07lrAYbXIXk 5fpaS0ezvrjBiORLRyMND0iQLfsxlPKa6tO3u0ZWlnSJ3t5NGZQB8KCf4Q+al6H/vZYkhKwa9VBu5 HnH1VyYc+D4sUvZ+6BPCdUndZPPjMwNgVPSj74pyGsNOGdyvhd/PYAjhrosNDOJBlUUW+Fte/4GuA GTVPtobA==; Received: by zero.zsh.org with local id 1pJbAO-0002Ae-Rv; Sun, 22 Jan 2023 14:17:52 +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]:43570) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1pJb9m-0001SE-LA; Sun, 22 Jan 2023 14:17:15 +0000 Received: from csp01.eastlink.ca ([71.7.199.166]) by mta03.eastlink.ca ([24.224.136.9]) with ESMTPS id <0ROW00HS24VTDSB0@mta03.eastlink.ca> for zsh-users@zsh.org; Sun, 22 Jan 2023 10:17:12 -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 Jb9jpPvq76z6sJb9jpbkuE (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Sun, 22 Jan 2023 10:17:12 -0400 X-Authority-Analysis: v=2.4 cv=bOzQYtyZ c=1 sm=1 tr=0 ts=63cd4568 a=xN66ZtSbq5jdJYpBp7G/jQ==:117 a=xN66ZtSbq5jdJYpBp7G/jQ==:17 a=IkcTkHD0fZMA:10 a=OBk47Jq2W-0Dt4R-T90A:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudduiedgieegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnhepiedtjeffvefgtdehgefgteekueeggeeitedutddvvdduteetffdvveelgfeukedunecukfhppedvgedrvddtjedrudekrddutdeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrddukedruddtkedphhgvlhhopegludelvddrudeikedrtddrgegnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepreerpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: Date: Sun, 22 Jan 2023 06:17:11 -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 Content-language: en-US To: zsh-users@zsh.org References: <0dc71450-d082-93da-52f8-d4e6b97199af@eastlink.ca> <378fcf6a-edb0-885b-3d08-9ebee33bb911@eastlink.ca> <3885c637-c56f-2bb7-9a89-02009254ed75@eastlink.ca> <3b93f68e-d090-15c0-c15e-a3d09d702f76@eastlink.ca> <07323898-9985-4e9f-8b54-c08fd8510fe8@app.fastmail.com> <08102bc6-b331-504f-fcd5-28fa3cdb0e2f@eastlink.ca> From: Ray Andrews In-reply-to: Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 8bit X-Seq: 28711 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-22 04:29, Roman Perepelitsa wrote: > > Perhaps you can use something like this to describe parameters: > > describe-param() { > emulate -L zsh > [[ ARGC -eq 1 && -n $1 ]] || return > set -- "$@" ${(Pt)1} > [[ -$2- == *-hide-* ]] && return 1 > print -rn -- "$2 ${(q-)1}" > if [[ -$2- == *-hideval-* ]]; then > print > else > set -- "$@" ${(M)2:#(array|association)(|-*)} > print -r -- "=${3:+( }${(j: :)${(@qqq)${(@kv)${(@P)1}}}}${3:+ )}" > fi > } > Fantastic.  I've never seen parameter descriptions of that sort. So verbal, so helpful , so complete.  Whoever coded that was a friend of humanity that day: 5 /aWorking/Zsh/Source/Wk 0 $ describe-param PATH scalar-tied-export-special PATH=".:/aWorking/Zsh/System:/aWorking/Bin:/usr/local/bin:/usr/sbin:/usr/bin" 5 /aWorking/Zsh/Source/Wk 0 $ describe-param path array-tied-special path=( "." "/aWorking/Zsh/System" "/aWorking/Bin" "/usr/local/bin" "/usr/sbin" "/usr/bin" ) ... ALL the information, all the time.  I'll bet it even works on Tuesdays.  Dunno, it's mostly a psychological thing but whereas most of the time brief, compact information is all you need, it is nice to know that when you hafta, you can get ALL the information.  I learn that PATH is exported and path is not!  Who knew?  typeset -p obfuscates more than helps.  But, as Bart was saying, we can't export arrays (why not? it seems arbitrary), so that's what PATH is for.  Complete information explains itself. If I'd had that function from the getgo, this entire thread would have been unnecessary, the issue would have explained itself. It's going to be a good day.