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, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 8688 invoked from network); 2 Nov 2022 03:15:13 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 2 Nov 2022 03:15:13 -0000 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:Cc:To:From:Date:References:In-Reply-To:Message-Id: Mime-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=7LVZ5aVETgNZffgm3cYx70DakD2s2l6pEZpvF+Z2S0Q=; b=KiDYdrXhN2L6MHBPUDX+fRQgZQ lCzEaq1I6otHQP1rMf7BNtJ1Njum9CXlF/0aiHjR7hOxtNro7XYIfbDydrDPnTaPVZ4wII1SLrril SMMXizuFNndDl56QBEHDY9Y5fbnDNH13Rs92cdIQZHCCFrdC+cCPtmle7+98JTBv9u5L1gRYu4Q1a pAGnmA2kGq0JO0FMNpgg+xMS1XVMsvCvR4+fiT35DYYIL9ISVqzEXrHr5xRe78crw5nByCbfKfILY /NoNj17zvn3xKfKLQgU8OA8uXd7IE7BQXNht5Ar4beY09sTVGr667XVVlINRruRFYuLSLjDN8CMwm qioSQSMA==; Received: by zero.zsh.org with local id 1oq4Dg-0005aD-KF; Wed, 02 Nov 2022 03:15:12 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1oq4Bf-0004cM-Sn; Wed, 02 Nov 2022 03:13:08 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id F26CE27C005B; Tue, 1 Nov 2022 23:13:05 -0400 (EDT) Received: from imap48 ([10.202.2.98]) by compute2.internal (MEProxy); Tue, 01 Nov 2022 23:13:05 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrudeigdehiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgfgsehtqhertderreejnecuhfhrohhmpefnrgif rhgvnhgtvgcugggvlhojiihquhgviicuoehlrghrrhihvhesiihshhdrohhrgheqnecugg ftrfgrthhtvghrnhepheegieduieegvddvffdvgeefuddugfetvdettddtfedutdejvefg jefgveethedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homheplhgrrhhrhihvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduudeh udekjeejtdegqdduudelvdejfeekhedqlhgrrhhrhihvpeepiihshhdrohhrghesfhgrsh htmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: iaa214773:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 9CB1B31A0063; Tue, 1 Nov 2022 23:13:05 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1087-g968661d8e1-fm-20221021.001-g968661d8 Mime-Version: 1.0 Message-Id: <7e4f0447-694a-4971-9b23-77b323574f11@app.fastmail.com> In-Reply-To: <4ba3d422-cfe3-69c7-29fe-4b7afb73c9e7@eastlink.ca> References: <552657de-31ce-255a-bc8d-7c9cd4b8eabd@eastlink.ca> <530b18d0-5e72-6afd-7448-cdff9c119bda@eastlink.ca> <9712ca3f-76f8-3aed-0a40-c6269afb73ad@eastlink.ca> <69b46d22-4430-ddba-4b21-a220b4816438@eastlink.ca> <4f5942d7-c5e2-45fd-8da0-1de3dd8b2cf9@app.fastmail.com> <4ba3d422-cfe3-69c7-29fe-4b7afb73c9e7@eastlink.ca> Date: Tue, 01 Nov 2022 23:11:23 -0400 From: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= To: "Ray Andrews" Cc: "Axel Beckert" , zsh-users@zsh.org Subject: Re: "typeset -p" inconsistency Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Seq: 28318 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 Tue, Nov 1, 2022, at 10:42 PM, Ray Andrews wrote: > On 2022-11-01 18:13, Lawrence Vel=C3=A1zquez wrote: >> "It seems like a simple thing" (based on zero evidence, btw) is not >> a reason to duplicate existing functionality in a less precise and >> significantly more verbose way. > > Ironically my only thought was to reduce verbosity by getting rid of t= he=20 > duplication. > > ) > > 2 /aWorking/Zsh/Source/Wk 0 $ typeset -mp "(#i)path" > typeset -aT PATH path=3D( . /aWorking/Zsh/System /aWorking/Bin=20 > /usr/local/bin /usr/sbin /usr/bin ) > export -T PATH path=3D( . /aWorking/Zsh/System /aWorking/Bin=20 > /usr/local/bin /usr/sbin /usr/bin ) > > 2 /aWorking/Zsh/Source/Wk 0 $ . test; test path > typeset -g -aT PATH path=3D( . /aWorking/Zsh/System /aWorking/Bin=20 > /usr/local/bin /usr/sbin /usr/bin ) > export -T PATH path=3D( . /aWorking/Zsh/System /aWorking/Bin=20 > /usr/local/bin /usr/sbin /usr/bin ) > > ... three different permutations for one and the same variable. I=20 > suppose one gets used to it, but at first it's pretty confusing.=C2=A0= But=20 > that's just me. As Bart already explained, it is not "one and the same variable" -- PATH and path are *two separate variables*. So there is no "duplication". (I suppose one could argue that "-g" should always be output for global variables, even outside of functions, for the sake of consistency.) (As an aside, "test" is a builtin and POSIX-mandated utility, so using that name for your own purposes is not the best idea.) >>> No, I mean it seems a bit long and a bit belabored.=C2=A0 I'm just s= aying >>> that I'd expect those variables to be set to standard internal paths, >>> and if someone is running some particular distro they can add to the >>> paths as needed. >> Ask whoever packaged your zsh. That is not the default FPATH. >> > Ah!=C2=A0 So that's Debian's doing.=C2=A0 Funny they include so much s= tuff for=20 > other distros.=C2=A0 I'll edit that back to stock. That FPATH probably reflects the way Debian installs the functions, so modifying it too much might actually break things. (A stock zsh installation just dumps all the functions into one directory.) Perhaps Axel could provide some guidance here. --=20 vq