From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5896 invoked from network); 5 Sep 1999 12:57:46 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 5 Sep 1999 12:57:46 -0000 Received: (qmail 9602 invoked by alias); 5 Sep 1999 12:57:24 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2569 Received: (qmail 9595 invoked from network); 5 Sep 1999 12:57:23 -0000 Date: Sun, 5 Sep 1999 08:57:22 -0400 From: Gabor To: zsh-users@sunsite.auc.dk Subject: typeset -Z broken? Message-ID: <19990905085721.A15329@vmunix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.7i X-Operating-System: FreeBSD 2.2.7-STABLE i386 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