From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3694 invoked by alias); 26 Sep 2015 21:11:53 -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: 20651 Received: (qmail 12613 invoked from network); 26 Sep 2015 21:11:50 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,BODY_URI_ONLY autolearn=no autolearn_force=no version=3.4.0 X-Authority-Analysis: v=2.1 cv=T/C1EZ6Q c=1 sm=1 tr=0 a=62AtbbSsrca3scplPJj5lw==:117 a=62AtbbSsrca3scplPJj5lw==:17 a=N659UExz7-8A:10 a=pGLkceISAAAA:8 a=ZplG2PnJeAL6kD4TfisA:9 a=pILNOxqGKmIA:10 Message-id: <56070A12.7090907@eastlink.ca> Date: Sat, 26 Sep 2015 14:11:46 -0700 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-version: 1.0 To: zsh-users@zsh.org Subject: Re: question about parameter expansion References: <20150926101839.GA14021@gmail.com> <20150926180827.GA2617@gmail.com> <20150926185710.GA3981@gmail.com> In-reply-to: <20150926185710.GA3981@gmail.com> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit On 09/26/2015 11:57 AM, Dmitri Vereshchagin wrote: > * Mikael Magnusson [2015-09-26 21:34]: >> Here's another variant, which may or may not be considered more >> concise (it happens to be the exact same number of characters, but >> uses fewer things, and probably doesn't work under ksh_arrays, but >> then, what does, commas abounds), >> >> bar=${${:-baz}[1,$+foo-1]} > Nice. Seems like there is another alternative > > bar=${${foo-baz}#$foo} > Where is this sort of thing discussed in the manual? It is so often the case that I want to research something but I don't know where to look. Getting the basic terminology strait helps--I'd have thought the above was 'variable tests' or something like that, not 'parameter expansion' cuz I take parameter to refer to command arguments. In any case looking for 'parameter expansion' in the index is no help. Getting the overall grammatical terminology still eludes me. 'Variable' doesn't exist in the index at all and so I run out of ideas.