From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28564 invoked by alias); 11 May 2011 15:14:40 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29223 Received: (qmail 3097 invoked from network); 11 May 2011 15:14:28 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.220.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=iAU5hspFfHoiGE5m29TFgfY1qfpK7gpDa3S/7mU58QQ=; b=gcoxcxP6lfkajYplrtPb8rwXvPVh6P5dzxkXrCfGz9CFW1ZEW/ahHSW2G/20MiUo7P Y9ARfa65hE2l+6hQ1w7Xer5TnCZIWJi7flomGlAYCRTQvensJleqfxQWVQZFdnXs6CBV yfm9Beg8+tWukKGibX+wOKjTzucvBd7Kmoz4Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=EudTAxOsRB/EhQii08jqLF8Xtb3AQmvQ1iX8ia0cD4IHgTmNoHeCf54rMuvEUHbi+Q nMMd1cQIWUQ6iH3HlRpsmPqXXVVmpj6yxl/jrYIv42sp/qZ4/L5vumBFFlHSV+T8gIJ3 W+A9u8gxAHvIqHRwwDDhH33hImY5A3hjtzWMI= MIME-Version: 1.0 In-Reply-To: <110511080327.ZM23776@torch.brasslantern.com> References: <1305118971-25617-1-git-send-email-mikachu@gmail.com> <110511080327.ZM23776@torch.brasslantern.com> Date: Wed, 11 May 2011 17:14:22 +0200 Message-ID: Subject: Re: PATCH: expanding parameters like echo/print builtins From: Mikael Magnusson To: Bart Schaefer Cc: zsh-workers@zsh.org Content-Type: text/plain; charset=UTF-8 On 11 May 2011 17:03, Bart Schaefer wrote: > On May 11, 3:02pm, Mikael Magnusson wrote: > } Subject: PATCH: expanding parameters like echo/print builtins > } > } Is this already possible? I had an array with a lot of \u1234 escapes > } in it, and couldn't find a way to do it easily. > > I'd probably have done it with ${(%)arr:gs/%/%%} Yeah, me too, except (%) doesn't expand \u304c or \0123, or any of the other stuff that (g) expands :). > [...] I don't have > any objection to the (g) flag except to wonder if another choice for > the letter (g) might be better. The fact that it mnemes to GETKEY_ > isn't going to be very helpful to most users. > > But I don't have the list of available letters handy. :-) I looked at the list of letters and the first free one was b, so i picked that, then when i got as far as discover that the function is called getkeystring and noticed g was also free, i went with that. e is taken (for echo), and p which does the same for subsequent flags is taken, and P is also taken. If anyone has a better mnemonic in mind, feel free to suggest it. The following characters are taken: #%@AacCDefFikLnoOPqQtuUvVwWXz0p~jlmrsZ_lBEMNR -- Mikael Magnusson