From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19277 invoked from network); 8 Mar 2006 20:51:07 -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.5 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 20:51:07 -0000 Received: (qmail 39251 invoked from network); 8 Mar 2006 20:51:01 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 8 Mar 2006 20:51:00 -0000 Received: (qmail 6127 invoked by alias); 8 Mar 2006 20:50:52 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10006 Received: (qmail 6115 invoked from network); 8 Mar 2006 20:50:52 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 8 Mar 2006 20:50:52 -0000 Received: (qmail 38108 invoked from network); 8 Mar 2006 20:50:52 -0000 Received: from batman.mns.ru (80.70.224.14) by a.mx.sunsite.dk with SMTP; 8 Mar 2006 20:50:51 -0000 Received: from lan-228-198.users.mns.ru ([80.70.228.198]) by batman.mns.ru with esmtp; Wed, 08 Mar 2006 23:50:50 +0300 id 00010B57.440F43AA.000063FA From: Konstantin Sobolev To: zsh-users@sunsite.dk Subject: Re: chpwd() & print -Pn Date: Wed, 8 Mar 2006 23:50:50 +0300 User-Agent: KMail/1.9.1 References: <200603082010.08251.k_o_s@mail.ru> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200603082350.50376.k_o_s@mail.ru> On Wednesday 08 March 2006 20:39, Peter Stephenson wrote: > > 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.) No, I've copied the function from the .zshrc file. ^[ is really there. > > 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. strangely enough, my sequence really works, xterm title is changed. But this crap is printed after each 'cd'. However, your variant works flawlessly, I'll use it :) Thanks. -- /KoS * Dancing with Wolves, Sleeping with beavers