zsh-users
 help / color / mirror / code / Atom feed
From: Gabor <gabor@vmunix.com>
To: zsh-users@sunsite.auc.dk
Subject: Re: typeset -Z broken? -R broken too?
Date: Mon, 6 Sep 1999 11:19:08 -0400	[thread overview]
Message-ID: <19990906111908.A27161@vmunix.com> (raw)
In-Reply-To: <19990905085721.A15329@vmunix.com>

It appears that -R is broken, too.

Here is output of ksh with -R
=== gabor $ typeset -R20 name;for name in *;do print "$name";done
                bin/
     sample-scripts/
           software/
               test/
=== gabor $ 

And here is zsh
=== gabor $ typeset -R20 name;for name in *;do print "$name";done
bin/
sample-scripts/
software/
test/
=== gabor $ 

Also, even with the fix here is zsh for -Z
=== gabor $ typeset -Z20 name;for name in *;do print "$name";done
bin/
sample-scripts/
software/
test/
=== gabor $ 

And here is ksh
=== gabor $ typeset -Z20 name;for name in *;do print "$name";done
                bin/
     sample-scripts/
           software/
               test/
=== gabor $ 

Here they are with 0 prefix for test dir
ksh
=== gabor $ typeset -Z20 name;for name in *;do print "$name";done
000000000000000test/
                bin/
     sample-scripts/
           software/
=== gabor $ 

zsh
=== gabor $ typeset -Z20 name;for name in *;do print "$name";done
000000000000000test/
bin/
sample-scripts/
software/
=== gabor $ 


:(

On Sun, Sep 05, 1999 at 08:57:22AM -0400, Gabor wrote:
# Here is the relevant part of the man page
# 
# 
#               -Z     Right justify and fill with leading zeros if
#                      the first non-blank character is a digit and
#                      the  -L  flag  has  not  been  set.  If n is
#                      nonzero it defines the width of  the  field;
#                      otherwise  it  is determined by the width of
#                      the value of the first assignment.
# 
# yet, when I use this I get left padding with zeros even on names that don't
# start with a digit
# 
# typeset -Z10 nname
# for name in *; do
#     if (( ${#name} < 10 )) then
# 	nname=$name
# 	mv $name $nname
#     fi
# done


  reply	other threads:[~1999-09-06 16:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-05 12:57 typeset -Z broken? Gabor
1999-09-06 15:19 ` Gabor [this message]
1999-09-07  8:41 typeset -Z broken? -R broken too? Sven Wischnowsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19990906111908.A27161@vmunix.com \
    --to=gabor@vmunix.com \
    --cc=zsh-users@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).