From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 629 invoked by alias); 26 Oct 2012 06:07:10 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17349 Received: (qmail 16119 invoked from network); 26 Oct 2012 06:06:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at brasslantern.com does not designate permitted sender hosts) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=YAca2boDSWgo33RtvVTv5KtUsl14ud8DYgkhq78TJUs=; b=J9EslviwMrefq77H3tqQCsDlLroG2tgl3vJ3IaHeP4YpxRmBGu/3S4ghEpbOVV7Xh4 +w0AjbYFoEe4OqTCp3zLykcqnDrr3WSsyaFes06bareNUKrRvBhTG33N0ZQ3RjgnCnHp IWo+iJKr6YUQ29hKt+GU/W1TUSKcGP7/9XacgNO3H9ZH1taf15x0u8eFQAdvQDFrQp8P ff2C/Av0kOlYDm6VWG7k6+/x5v5VJifdYM1B/vYoXQHqDqLxSLUIKnG0jhkPfihTo8YN WeojZ/2QSN66W/iwiabYJOgEA/+QvkPv/ay/MNck3YozvVKQUK1dsS6TfdlSrbqfAWxc 7YpA== MIME-Version: 1.0 In-Reply-To: <50895F66.9050407@internecto.net> References: <50895F66.9050407@internecto.net> Date: Thu, 25 Oct 2012 23:06:48 -0700 Message-ID: Subject: Re: (AA) example From: Bart Schaefer To: Zsh Users Content-Type: multipart/alternative; boundary=047d7bdc10360eb67c04ccf02010 X-Gm-Message-State: ALoCoQnaDcnClVDRFAPuz5pHDQebC9Oa6aSvRGE4eu2isW/m+FYF+DErYMN97a2yRJRMzHdT7nHQ --047d7bdc10360eb67c04ccf02010 Content-Type: text/plain; charset=ISO-8859-1 On Thursday, October 25, 2012, Mark van Dijk wrote: > Hello list members, > > I'd like to ask for an example of how the A and AA parameter expansion > flags work. The description in the manual is too complicated for me to > grasp. > > I am not sure whether these flags can add a value to an (associative) > array which already exists? > No, they cannot add to an existing parameter. They always work as if array=(values...), all or nothing. The circumstances in which one would want to use these flags, especially AA, are very limited. They exist only for generality of the test-and-set behavior of ${var=value} -- if you can think of a case where you want to substitute an entire associative array into a larger expression, you might be able to find a corresponding example where you'd want AA. Otherwise you probably should be using ${ary[field]=value}, or assignment statements like Peter described. --047d7bdc10360eb67c04ccf02010--