From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12439 invoked from network); 15 Sep 2006 15:38:59 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.5 (2006-08-29) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 15 Sep 2006 15:38:59 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 93015 invoked from network); 15 Sep 2006 15:38:53 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 15 Sep 2006 15:38:53 -0000 Received: (qmail 16784 invoked by alias); 15 Sep 2006 15:38:51 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22714 Received: (qmail 16775 invoked from network); 15 Sep 2006 15:38:50 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 15 Sep 2006 15:38:50 -0000 Received: (qmail 92658 invoked from network); 15 Sep 2006 15:38:50 -0000 Received: from cluster-d.mailcontrol.com (217.69.20.190) by a.mx.sunsite.dk with SMTP; 15 Sep 2006 15:38:46 -0000 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly23d.srv.mailcontrol.com (MailControl) with ESMTP id k8FFa5pV002027 for ; Fri, 15 Sep 2006 16:38:42 +0100 Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Fri, 15 Sep 2006 16:36:53 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.13.4/8.13.4) with ESMTP id k8FFarkq018944 for ; Fri, 15 Sep 2006 16:36:53 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.13.4/8.13.4/Submit) with ESMTP id k8FFar2G018941 for ; Fri, 15 Sep 2006 16:36:53 +0100 Message-Id: <200609151536.k8FFar2G018941@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: Core dump with latest CVS In-reply-to: <060915081653.ZM9804@torch.brasslantern.com> References: <20a807210609141402v31714a98wab9b75ff7736327@mail.gmail.com> <200609150957.k8F9v4uq021513@news01.csr.com> <200609151308.k8FD8IGQ025083@news01.csr.com> <060915081653.ZM9804@torch.brasslantern.com> Comments: In-reply-to Bart Schaefer message dated "Fri, 15 Sep 2006 08:16:53 -0700." Date: Fri, 15 Sep 2006 16:36:53 +0100 From: Peter Stephenson X-OriginalArrivalTime: 15 Sep 2006 15:36:54.0100 (UTC) FILETIME=[C549F140:01C6D8DC] Content-Type: text/plain MIME-Version: 1.0 X-Scanned-By: MailControl A-07-04-01 (www.mailcontrol.com) on 10.68.0.133 Bart Schaefer wrote: > My concern is that "printability" shouldn't have anything to do with it. > Programmatically, the expression > > (( ${#:-X} == 1 && ${#(pl.width..X.)} == width )) > > should always be true. OK, you're interpreting "width" differently... to me, that's a string length, not a width at all. It doesn't really matter as long as it's documented. So that would be the last option I posted, treat multibyte characters but assume they have width 1 (or, in better English, use string lengths rather than character widths for padding) unless there's an additional flag. I would propose to supply such a flag, if we go this way. > I could see an argument that ${#(%pl.width.X)} could compute the padding > based on printable width, because the presence of % means we're expanding > prompt escapes so presumably we want printable values I don't really see why a normal user would assume the expression *didn't* deal with printable widths, but, again, that's mostly a matter of documentation. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php