Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: extended braces syntax, {1..32..-03}



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