* typeset for integers @ 2005-06-05 19:28 Justin M Wozniak 2005-06-05 19:40 ` Andrey Borzenkov 2005-06-05 22:49 ` Bart Schaefer 0 siblings, 2 replies; 6+ messages in thread From: Justin M Wozniak @ 2005-06-05 19:28 UTC (permalink / raw) To: zsh-users Is there a way to get internal integer performance combined with leading zero output? I.e., for typeset to combine -Z & -i ? Thanks -- Justin Michael Joseph Wozniak ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: typeset for integers 2005-06-05 19:28 typeset for integers Justin M Wozniak @ 2005-06-05 19:40 ` Andrey Borzenkov 2005-06-05 20:21 ` Justin M Wozniak 2005-06-05 22:49 ` Bart Schaefer 1 sibling, 1 reply; 6+ messages in thread From: Andrey Borzenkov @ 2005-06-05 19:40 UTC (permalink / raw) To: zsh-users; +Cc: Justin M Wozniak [-- Attachment #1: Type: text/plain, Size: 302 bytes --] On Sunday 05 June 2005 23:28, 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 ? Do you mean this? pts/2}% typeset -i 10 -Z 5 i {pts/2}% echo $i 00005 {pts/2}% i=17 {pts/2}% echo $i 00017 -andrey [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: typeset for integers 2005-06-05 19:40 ` Andrey Borzenkov @ 2005-06-05 20:21 ` Justin M Wozniak 0 siblings, 0 replies; 6+ messages in thread From: Justin M Wozniak @ 2005-06-05 20:21 UTC (permalink / raw) To: Andrey Borzenkov; +Cc: zsh-users I'm using 4.2.1 and I don't get that result: ~> typeset -i 10 -Z 5 v=3 ; echo ${v} 3 -- Justin Michael Joseph Wozniak On Sun, 5 Jun 2005, Andrey Borzenkov wrote: > On Sunday 05 June 2005 23:28, 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 ? > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: typeset for integers 2005-06-05 19:28 typeset for integers Justin M Wozniak 2005-06-05 19:40 ` Andrey Borzenkov @ 2005-06-05 22:49 ` Bart Schaefer 2005-06-06 16:35 ` Andrey Borzenkov 1 sibling, 1 reply; 6+ messages in thread From: Bart Schaefer @ 2005-06-05 22:49 UTC (permalink / raw) To: zsh-users 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. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: typeset for integers 2005-06-05 22:49 ` Bart Schaefer @ 2005-06-06 16:35 ` Andrey Borzenkov 2005-06-06 16:42 ` Peter Stephenson 0 siblings, 1 reply; 6+ messages in thread From: Andrey Borzenkov @ 2005-06-06 16:35 UTC (permalink / raw) To: zsh-users [-- Attachment #1: Type: text/plain, Size: 536 bytes --] On Monday 06 June 2005 02:49, Bart Schaefer wrote: > 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). {pts/1}% rpm -q zsh zsh-4.2.5-1mdk {pts/1}% echo $ZSH_VERSION 4.2.5 it is the last official one IIRC? -andrey [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: typeset for integers 2005-06-06 16:35 ` Andrey Borzenkov @ 2005-06-06 16:42 ` Peter Stephenson 0 siblings, 0 replies; 6+ messages in thread From: Peter Stephenson @ 2005-06-06 16:42 UTC (permalink / raw) To: zsh-users Andrey Borzenkov wrote: > {pts/1}% rpm -q zsh > zsh-4.2.5-1mdk > {pts/1}% echo $ZSH_VERSION > 4.2.5 Now I've woken up, according to this 2004-12-07 Peter Stephenson <pws@csr.com> * 20605: Doc/Zsh/builtins.yo, Src/builtin.c, Src/exec.c, Src/module.c, Src/params.c, Src/subst.c, Src/zsh.h, Src/Modules/datetime.c, Src/Modules/langinfo.c, Src/Modules/mapfile.c, Src/Modules/parameter.c, Src/Modules/system.c, Src/Modules/termcap.c, Src/Modules/terminfo.c, Src/Modules/zftp.c, Src/Zle/compctl.c, Src/Zle/complete.c, Src/Zle/computil.c, Src/Zle/zle_params.c, Src/Zle/zleparameter.c, Test/B02typeset.ztst: Use separate structures for get, set and unset methods of parameters. Separate width and base/precision for parameters, so that justification works for integers. it appeared in 4.2.2. -- Peter Stephenson <pws@csr.com> Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ********************************************************************** ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-06-06 16:43 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-06-05 19:28 typeset for integers Justin M Wozniak 2005-06-05 19:40 ` Andrey Borzenkov 2005-06-05 20:21 ` Justin M Wozniak 2005-06-05 22:49 ` Bart Schaefer 2005-06-06 16:35 ` Andrey Borzenkov 2005-06-06 16:42 ` Peter Stephenson
Code repositories for project(s) associated with this public inbox https://git.vuxu.org/mirror/zsh/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).