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

Re: Numeric version of ZSH_VERSION?



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