Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: expanding parameters like echo/print builtins
- X-seq: zsh-workers 29223
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: PATCH: expanding parameters like echo/print builtins
- Date: Wed, 11 May 2011 17:14:22 +0200
- Cc: zsh-workers@xxxxxxx
- 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=
- In-reply-to: <110511080327.ZM23776@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <1305118971-25617-1-git-send-email-mikachu@gmail.com> <110511080327.ZM23776@torch.brasslantern.com>
On 11 May 2011 17:03, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author