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=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 4041 invoked from network); 21 Dec 2022 09:40:06 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 21 Dec 2022 09:40:06 -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:To:From:Date:References:In-Reply-To:Message-Id: Mime-Version:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=iEfvHWczZZ1dQl4mKmgE62FFWGI3hAJ24tDjJ1wZ0vY=; b=TZ1j5FrK24CS3hjJr5y6GrKwzf YYQU/6bgws5vZlJ8MJ3e8BUfmfrlolOmvpSZ0qE1EqjNyL2TO/XfyFfi2v7i5YBqMSraYkJKkG8WA Gvda/Oa74J4PJDjcVVEiWHUMRakEM0TiWG6uyRdUrp+H4ZTZ7arq4eEYGeZEUdUnP0TY/Lcr/pR1u VcQ4TXvucCUhURr2mDGVv/6GafEWt2DhvP/p6a1xgWxF4+ApKvolaNlbVQ9EyGR6r/YddwKRmUakF 6dajDZT47+z0BbNUOICPftxzmLx7+5I6c2r5b3fUWg6R/T9P1VbLvpt+SQuNwLEfPQwOMJJRKC8MD pu99khKg==; Received: by zero.zsh.org with local id 1p7vZy-0004oz-UU; Wed, 21 Dec 2022 09:40:02 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1p7vZC-00045L-Lb; Wed, 21 Dec 2022 09:39:14 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id 42E8327C0060 for ; Wed, 21 Dec 2022 04:39:10 -0500 (EST) Received: from imap48 ([10.202.2.98]) by compute1.internal (MEProxy); Wed, 21 Dec 2022 04:39:10 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgeekgddtiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgfgsehtqh ertderreejnecuhfhrohhmpefnrgifrhgvnhgtvgcugggvlhojiihquhgviicuoehlrghr rhihvhesiihshhdrohhrgheqnecuggftrfgrthhtvghrnhepgfffgefhheejgedtiedtve egheegheejfefffeeffeeigeeuvddtgedtteduueefnecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomheplhgrrhhrhihvodhmvghsmhhtphgruhhthh hpvghrshhonhgrlhhithihqdduudehudekjeejtdegqdduudelvdejfeekhedqlhgrrhhr hihvpeepiihshhdrohhrghesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: iaa214773:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id EF5A831A0063; Wed, 21 Dec 2022 04:39:09 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1185-g841157300a-fm-20221208.002-g84115730 Mime-Version: 1.0 Message-Id: In-Reply-To: <20221221020026.GH8411@tarpaulin.shahaf.local2> References: <71c9c7e9-3f95-143d-fbd6-6575d7f4c446@eastlink.ca> <20221221020026.GH8411@tarpaulin.shahaf.local2> Date: Wed, 21 Dec 2022 04:38:49 -0500 From: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= To: zsh-users@zsh.org Subject: Re: manual Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Seq: 28604 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, Dec 20, 2022, at 9:00 PM, Daniel Shahaf wrote: > Let's try and focus please and > the two specific issues identified (=C2=ABset -A=C2=BB and types; =C2=AB= set -A=C2=BB and > prefixes). Here's an attempt. Instead of trying to address every possible case, I chose to describe the behavior in terms of other assignment constructs which (to my knowledge) operate equivalently. diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo index 56428a714..fca6db8e5 100644 --- a/Doc/Zsh/builtins.yo +++ b/Doc/Zsh/builtins.yo @@ -1687,13 +1687,19 @@ the description of tt(setopt) below for more inf= ormation on the format. With tt(PLUS()o) they are printed in a form that can be used as input to the shell. =20 -If the tt(-A) flag is specified, var(name) is set to an array containing -the given var(arg)s; if no var(name) is specified, all arrays are print= ed -together with their values. - -If tt(PLUS()A) is used and var(name) is an array, the -given arguments will replace the initial elements of that array; if no -var(name) is specified, all arrays are printed without their values. +If tt(-A) var(name) is specified, the var(arg)s are assigned to +var(name) as with `var(name)tt(=3DLPAR())var(arg) ...tt(RPAR())'. If +tt(-A) is specified without var(name), all arrays are printed together +with their values. + +If tt(PLUS()A) var(name) is specified, and var(name) is a normal array, +the var(arg)s are assigned to var(name) as with +`var(name)tt([1,)var(N)tt(]=3DLPAR())var(arg) ...tt(RPAR())' (or +`var(name)tt([0,)var(N)tt(-1]=3DLPAR())var(arg) ...tt(RPAR())' with +tt(KSH_ARRAYS) set), where var(N) is the number of var(arg)s provided. +If var(name) is not a normal array, tt(PLUS()A) var(name) behaves like +tt(-A) var(name). If tt(PLUS()A) is specified without var(name), all +arrays are printed without their values. =20 The behaviour of arguments after tt(-A) var(name) or tt(PLUS()A) var(na= me) depends on whether the option tt(KSH_ARRAYS) is set. If it is not set,= all --=20 vq