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

Re: typeset for integers



On Jun 5,  2:28pm, Justin M Wozniak wrote:
} 
} Is there a way to get internal integer performance combined with leading
} zero output?  I.e., for typeset to combine -Z & -i ?

There was a (large) patch in zsh-workers/20605 to enable this.  It's in
the most recent -dev- version of zsh, which is why Andrey can use it
but you can't (yet).  I don't think the patch will apply cleanly to 4.2.1
because of other changes that have happened in the dev revisions, but I
would be happy to learn I'm wrong.

Meanwhile, use e.g. ${(l:5::0:)i} when i is an integer parameter.



Messages sorted by: Reverse Date, Date, Thread, Author