From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3992 invoked from network); 29 Jan 2001 09:23:36 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Jan 2001 09:23:36 -0000 Received: (qmail 18112 invoked by alias); 29 Jan 2001 09:23:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13397 Received: (qmail 18101 invoked from network); 29 Jan 2001 09:23:30 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "ZSH workers mailing list" Subject: More on zsh user's guide formatting glitch Date: Mon, 29 Jan 2001 12:23:23 +0300 Message-ID: <001501c089d5$20798c90$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal In-Reply-To: <001401c089d3$6b0af980$21c9ca95@mow.siemens.ru> In 3.3.3: compiling functions, Special functions: chpwd() { [[ -t 1 ]] || return case $TERM in sun-cmd print -Pn "\e]l%~\e\\" ;; *xterm*|rxvt|(dt|k|E)term) print -Pn "\e]2;%~\a" ;; esac } ) The first line tests that standard output is really a terminal --- you don't want i.e. formatting is broken. Hmm ... in my experience, setting title in chpwd() turned out to be suboptimal. If any external program (zsh subshell including) changed your title, zsh won't notice it until next cd. So, I finally decided in favour of preexec(). May be, trapping child exits could do the job, but it looks just too complicated for this simple task. -andrej