From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21048 invoked from network); 8 Mar 2006 17:45:54 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) 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.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 8 Mar 2006 17:45:54 -0000 Received: (qmail 81684 invoked from network); 8 Mar 2006 17:45:47 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 8 Mar 2006 17:45:47 -0000 Received: (qmail 6169 invoked by alias); 8 Mar 2006 17:45:38 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10005 Received: (qmail 6159 invoked from network); 8 Mar 2006 17:45:37 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 8 Mar 2006 17:45:37 -0000 Received: (qmail 80418 invoked from network); 8 Mar 2006 17:45:37 -0000 Received: from cluster-d.mailcontrol.com (217.69.20.190) by a.mx.sunsite.dk with SMTP; 8 Mar 2006 17:45:35 -0000 Received: from exchange03.csr.com (uuk202166.uk.customer.alter.net [62.189.241.194] (may be forged)) by rly01d.srv.mailcontrol.com (MailControl) with ESMTP id k28HfrXT018608 for ; Wed, 8 Mar 2006 17:45:33 GMT Received: from csr.com ([10.103.143.38]) by exchange03.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 8 Mar 2006 17:40:08 +0000 To: zsh-users@sunsite.dk Subject: Re: chpwd() & print -Pn In-reply-to: <200603082010.08251.k_o_s@mail.ru> References: <200603082010.08251.k_o_s@mail.ru> Comments: In-reply-to Konstantin Sobolev message dated "Wed, 08 Mar 2006 20:10:08 +0300." Date: Wed, 08 Mar 2006 17:39:53 +0000 From: Peter Stephenson Message-ID: X-OriginalArrivalTime: 08 Mar 2006 17:40:08.0053 (UTC) FILETIME=[57876250:01C642D7] Content-Type: text/plain MIME-Version: 1.0 X-Scanned-By: MailControl A-06-00-05 (www.mailcontrol.com) on 10.68.0.111 Konstantin Sobolev wrote: > Hi > > sorry for probably a stupid question.. after upgrading zsh from 4.2.x to 4.3. > 2 > my chpwd function meant to update xterm's title stopped working: > > chpwd () { print -Pn '^[]2;%~^G' } > > instead it simply prints this stuff to the console: > > kos@kos /tmp $ cd /tmp > ^[]2;/tmp^G% > > what could be causing it? The syntax you're showing only works if the ^[ is a real escape character and ^G a real control-G: "print -P" doesn't handle the ^ in the way that bindkey does. Maybe you copied this in some way as to turn it into the characters you've shown? (The terminal will represent the characters in the way you've shown on output the same in either case.) It's safer to use: chpwd() { print -Pn '\e]2;%~\a' } However, this hasn't actually changed since 4.2; I tried 4.0.7 and 4.2.2 and they behaved the same way. -- 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