From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 661 invoked from network); 6 Sep 1999 16:07:56 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Sep 1999 16:07:56 -0000 Received: (qmail 22261 invoked by alias); 6 Sep 1999 15:19:13 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2577 Received: (qmail 22254 invoked from network); 6 Sep 1999 15:19:09 -0000 Date: Mon, 6 Sep 1999 11:19:08 -0400 From: Gabor To: zsh-users@sunsite.auc.dk Subject: Re: typeset -Z broken? -R broken too? Message-ID: <19990906111908.A27161@vmunix.com> References: <19990905085721.A15329@vmunix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.7i In-Reply-To: <19990905085721.A15329@vmunix.com> X-Operating-System: FreeBSD 2.2.7-STABLE i386 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