Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: extended braces syntax, {1..32..-03}
- X-seq: zsh-workers 28496
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Richard Hartmann <richih.mailinglist@xxxxxxxxx>
- Subject: Re: extended braces syntax, {1..32..-03}
- Date: Mon, 6 Dec 2010 22:49:11 +0100
- Cc: zsh workers <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=PMe9rRzXMt0hV9UdHnvbrad+X/q9JtO/2AA3/+Iy8yw=; b=K8OUovC/PzK4DfuXvNLGogdpZoL3u8gKfK8I9Yqh0LIXqHT2opgKzQNo7xqV8EzQt7 jl0OsK8gVo51eSajvN20YkAZUAO4MlR9HRpSwMajAdytVklX4h47vW/6vyvl12BZvJY6 zh0BFEoAKzPreCfte9L0Hnxjxa+uX/d/wkQOo=
- 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=xggNtxPspgB6Lf1zehtl/MS7STwmruExQTbBlib9eViNzqlzYgrdWnXJQlBO23iA2N /VOosfAI1FINZHiFsDS1+Xxzsfmi18pzW4QFFm2pFcn8YWtwlPzbkavbewIxy/bEgeAO hGtwgb2oJO0H3bsri26BxWkPnov8WYS4PhwVQ=
- In-reply-to: <AANLkTinGZO_yfpv3QsOt3PiVWsWNMKwSKk0Crvz=Vt3E@xxxxxxxxxxxxxx>
- 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: <AANLkTimOhbjnSiCWJ9y8jJ_WCscTF27ROR=Fg2twOMod@xxxxxxxxxxxxxx> <AANLkTinvYn_F50XiPdMauivmpsg2-NE9DrYzwcc+a+b8@xxxxxxxxxxxxxx> <AANLkTikvssL1T2hJRpNfuSOmbKbF3KS2VV9CViHeawzu@xxxxxxxxxxxxxx> <AANLkTinGZO_yfpv3QsOt3PiVWsWNMKwSKk0Crvz=Vt3E@xxxxxxxxxxxxxx>
On 6 December 2010 22:17, Richard Hartmann <richih.mailinglist@xxxxxxxxx> wrote:
> On Mon, Dec 6, 2010 at 22:00, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>
>>>> Originally i had the same number of zeroes regardless of the minus
>> sign, but bash does it this way, so I figured I'd be consistent with
>> that.
>
> Oups. Can I claim "too stupid to read" in my defense?
>
> While I can see the advantage in being compatible with Bash, this
> behavior is arguably a bug. If you want, I can pester them about
> changing their behavior. Or you decide to change it. Or I just shut up
> :)
I just tested in C (printf) and it does it this way too,
printf ("%04d %04d", -5, 5);
-005 0005
as does zsh's printf
% printf '%04d %04d' -5 5
-005 0005
>On Mon, Dec 6, 2010 at 22:04, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>> I actually realized it's not my fault, it always did that :). (but you
>> still needed setopt braceccl to expand them before the patch).
>Also a bug imo. But as it's been that way, changing it is probably not
>a option, is it?
Well, I don't think a feature only available by an option that does
something completely different can really be said to be reliable, but
I'll let someone else decide, if they even care. I could in any case
limit the nobraceccl case to disallow it.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author