Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Add g:: parameter expansion flag
- X-seq: zsh-workers 29253
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: PATCH: Add g:: parameter expansion flag
- Date: Thu, 12 May 2011 21:41:36 +0200
- 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:content-type:content-transfer-encoding; bh=rRAAcB6BrWYEEbmiLGU2KcMIE/6siT8ei5Ra9g0eVNI=; b=JjrG2xvUWdX/WwWqKZpUSeiaW1CWX5es2+Caxq9ktIVVyuiCKBO8c2LCP2EHxZK60c Pmd3OQ1N81/jwRnPZ79JhIqTyKkJiqUK9NV126/MC6d+SPo70qkquhVPRbId1FMUYRw3 yb4Ny+jeipzqt6joxeRkS08Rw8VBVY3pq0r1A=
- 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 :content-type:content-transfer-encoding; b=rQWDahM4bmNwDHHPaETmyFXEhiZiMA5hCUqczpyI2S+jmOOjsDFojocoQ/twtRY9gu 9kkAD7xEaXRckEK+y8/OEMwzpGu2vfvJpbMfddhc7KVjHM6fwnUeE3N67IRic3lQyRZi 6SbO05cqRGNqheEx1GqOeXc9fEdTNRcH8F/fg=
- In-reply-to: <1305215346-27247-1-git-send-email-mikachu@gmail.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: <110512070408.ZM29757@torch.brasslantern.com> <1305215346-27247-1-git-send-email-mikachu@gmail.com>
On 12 May 2011 17:49, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> Okay, how's this? I swapped the order so g happens first, and changed
> the docs as discussed.
Just as I was thinking about committing it, I found a bug. I have to
metafy the result of getkeystring().
% print -Rn ${(g:o:):-'\201\227\343\201\257'}|wc -c
zsh: command not found: は
1
Not exactly the intended result :).
So I am pretty sure I want to use META_HREALLOC, is that correct? Ie
if (!copied)
val = dupstring(val), copied = 1;
val = getkeystring(val, &len, getkeys, NULL);
val = metafy(val, len, META_HREALLOC);
(and same for the isarr case)
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author