From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23542 invoked from network); 2 Jul 2007 09:31:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.1 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 2 Jul 2007 09:31:13 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 26661 invoked from network); 2 Jul 2007 09:31:06 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 2 Jul 2007 09:31:06 -0000 Received: (qmail 12155 invoked by alias); 2 Jul 2007 09:31:03 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23632 Received: (qmail 12145 invoked from network); 2 Jul 2007 09:31:02 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 2 Jul 2007 09:31:02 -0000 Received: (qmail 26286 invoked from network); 2 Jul 2007 09:31:02 -0000 Received: from cluster-d.mailcontrol.com (217.69.20.190) by a.mx.sunsite.dk with SMTP; 2 Jul 2007 09:30:58 -0000 Received: from rly46d.srv.mailcontrol.com (localhost.localdomain [127.0.0.1]) by rly46d.srv.mailcontrol.com (MailControl) with ESMTP id l629UmPA017380 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 2 Jul 2007 10:30:50 +0100 Received: from submission.mailcontrol.com (submission.mailcontrol.com [86.111.216.190]) by rly46d.srv.mailcontrol.com (MailControl) id l629U9dw015314 for zsh-workers@sunsite.dk; Mon, 2 Jul 2007 10:30:09 +0100 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly46d-eth0.srv.mailcontrol.com (envelope-sender Peter.Stephenson@csr.com) (MIMEDefang) with ESMTP id l629Tj2O013444; Mon, 02 Jul 2007 10:30:08 +0100 (BST) Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Mon, 2 Jul 2007 10:29:44 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.13.8/8.13.4) with ESMTP id l629TiKt003912; Mon, 2 Jul 2007 10:29:44 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.13.8/8.13.8/Submit) with ESMTP id l629Tgfw003908; Mon, 2 Jul 2007 10:29:44 +0100 Message-Id: <200707020929.l629Tgfw003908@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk, "Janos Barbero" Subject: Re: zsh weird behaviour (possibly bug?) In-reply-to: <77d935a0707012032u6011f3d1scf97e399ef7c5fa3@mail.gmail.com> References: <77d935a0707012032u6011f3d1scf97e399ef7c5fa3@mail.gmail.com> Comments: In-reply-to "Janos Barbero" message dated "Sun, 01 Jul 2007 20:32:18 -0700." Date: Mon, 02 Jul 2007 10:29:42 +0100 From: Peter Stephenson X-OriginalArrivalTime: 02 Jul 2007 09:29:44.0749 (UTC) FILETIME=[86913DD0:01C7BC8B] Content-Type: text/plain MIME-Version: 1.0 X-Scanned-By: MailControl A-07-07-10 (www.mailcontrol.com) on 10.68.1.156 "Janos Barbero" wrote: > I often notice that complex shell commands (usually with 5-10 pipes > and plenty of awk/sed) produce no output in zsh, but work fine in > bash. I found a really simple one today. > ls | sed 's/\<\(.\)\([^ ]*\)/\u\1\L\2/g' > This produces no output in zsh, but does in any bash version. Further > investigation revealed this to be due to my precmd's/postcmd's. So > some more data: > 1: precmd () { print -Pn "\ek%n@%m %~$ \e\\" } > 2: preexec() { print -Pn "\ek%n@%m %~$ $1\e\\" } > 3: precmd () { print -Pn "\ek%~\e\\" } > 4: preexec() { print -Pn "\ek%~ $1\e\\" } > > If I have only line 4, command doesn't return (I have to manually kill > the window), but plain ls works. If I leave lines 3 and 4, no output. > Leaving either or both lines 1 and 2, it works fine. (I tried these > with nothing else in my .zshrc.) > > Is the problem with my precmd/postcmd 3 and 4, or is this a zsh bug? It's hard to tell, but we can certainly say it's got *something* to do with the way your terminal behaves. I don't recognise those escape sequences, but the fact that changing them makes a difference suggests the terminal is doing something weird with the output. You didn't say what system you're on: if it's a MAC, somebody reported a similar problem recently. See the thread at http://www.zsh.org/cgi-bin/mla/redirect?WORKERNUMBER=23429 -- 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 To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview