Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Numeric version of ZSH_VERSION?
- X-seq: zsh-workers 25578
- From: "Rocky Bernstein" <rocky.bernstein@xxxxxxxxx>
- To: "Richard Hartmann" <richih.mailinglist@xxxxxxxxx>
- Subject: Re: Numeric version of ZSH_VERSION?
- Date: Mon, 1 Sep 2008 09:14:52 -0400
- Cc: "Dan Nelson" <dnelson@xxxxxxxxxxxxxxx>, "Zsh hackers list" <zsh-workers@xxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=LWZvHrvfIY6iGG5vw1/hqTQCJpUW02ZEInN/66goGNc=; b=tN4zsMOf5iOSGCWSZ51iYyMO/VNkwyi7OPKJCMkI6jfbyToefMtNnMJmOszLWMLUb8 leS5zPJUKwatVk/CoBiq4U3giAd343Bz8kTGIuCNarjIn9EFK8gNoluJcolxUycobPVo GGkzOK7lJdlQDH6Gq1G9kW8oTAj4oOfKfUIEU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=u1hgUH4jSqWynJLCPVfaQUmnJbUYCDsXLxKEnfGBg+UEbLhVnA4Dd3nIkWk0zVl09J HkjQWrZ8cnAUoehKa8z77YbioGKvSKo4tdJ/Oi+Q/uQlOVu0YLgXPZjYZ3+/cRzxbopI 3R5vDja0dbYKXACrLUbbBt4OgCqkpCL0H1a1U=
- In-reply-to: <6cd6de210809010606h19dc0ce0t34c5cbd9843d5c2e@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <6cd6de210808301954x6fd72987i4bb0ea3665951de1@xxxxxxxxxxxxxx> <20080831031632.GI26653@xxxxxxxxxxxxxxxx> <2d460de70809010538xfac8eceqc37a177c0481869c@xxxxxxxxxxxxxx> <6cd6de210809010606h19dc0ce0t34c5cbd9843d5c2e@xxxxxxxxxxxxxx>
Can't count, make that 08090101.
Also, I meant to mention that is-at-least is fine for my needs as I
hope I indicated in my first reply. Alas, since ZSH_VERSION doesn't
change as quickly as I'd like, I still have to test for specific
features within 4.3.6-dev-0. But ZSH_VERSION is one of the features
tested using is-at-least.
On Mon, Sep 1, 2008 at 9:06 AM, Rocky Bernstein
<rocky.bernstein@xxxxxxxxx> wrote:
> Yeah, I thought of that too. One can use ! is-at-least and booleans
> for ranges. Or one can add as you say all of this into the is-at-least
> package.
>
> This kind of awkwardness would be more glaring in languages that
> support numeric ranges (e.g. Perl, Python, Ruby).
>
> My personal view is that is-at-least is a more complicated solution
> to a problem which is more easily and naturally solved by adding a
> numeric variable which just keeps increasing, e.g. 08100101 which
> might be the first change of Sept 1, '08. (I just tried
> using 08100101 in an arithmetic expression and the number seems not to
> be too large.)
>
> ksh recently added such a thing to .sh.version, so that in a string
> context it prints a string while in a numeric context it prints a
> number:
>
> $ echo ${.sh.version}
> Version M 93t 2008-08-25
> $ printf "%d\n" .sh.version
> 20080825
>
> (From which I gather David Korn and Glenn Fowler don't plan on more
> than one release a day.)
>
>
> On Mon, Sep 1, 2008 at 8:38 AM, Richard Hartmann
> <richih.mailinglist@xxxxxxxxx> wrote:
>> On Sun, Aug 31, 2008 at 05:16, Dan Nelson <dnelson@xxxxxxxxxxxxxxx> wrote:
>>
>>> The Misc/is-at-least function should do what you need:
>>
>> It lacks a is-at-max sibling _if_ you need to actually check on ranges.
>> Why not just use revision numbers for this (unless ZSH falls into the
>> git trap, at some point :p)?
>>
>>
>> Richard
>>
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author