From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3619 invoked from network); 12 Jun 2005 17:12:22 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 12 Jun 2005 17:12:22 -0000 Received: (qmail 22127 invoked from network); 12 Jun 2005 17:12:17 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 12 Jun 2005 17:12:17 -0000 Received: (qmail 26374 invoked by alias); 12 Jun 2005 17:12:15 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21327 Received: (qmail 25578 invoked from network); 12 Jun 2005 17:05:34 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 12 Jun 2005 17:05:34 -0000 Received: (qmail 17891 invoked from network); 12 Jun 2005 17:05:34 -0000 Received: from nef2.ens.fr (129.199.96.40) by a.mx.sunsite.dk with SMTP; 12 Jun 2005 17:05:30 -0000 Received: from clipper.ens.fr (clipper-gw.ens.fr [129.199.1.22]) by nef2.ens.fr (8.13.2/1.01.28121999) with ESMTP id j5CH5T4I091084 for ; Sun, 12 Jun 2005 19:05:29 +0200 (CEST) X-Envelope-To: Received: from (noirel@localhost) by clipper.ens.fr (8.13.1/jb-1.1) Date: Sun, 12 Jun 2005 19:05:29 +0200 From: Josselin Noirel To: zsh-workers@sunsite.dk Subject: precmd() affecting the "r" command output Message-ID: <20050612170529.GA10725@clipper.ens.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.5.10 (nef2.ens.fr [129.199.96.32]); Sun, 12 Jun 2005 19:05:29 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 Hi, I'm using the precmd() special function to print the current directory and the hostname in the title bar of my xterms. But doing this, the output of the r command (executing again the last command) is affected in a unexpected and unwanted way - I guess. 1> which precmd precmd not found 2> locate foobar /usr/TeX/texmf-dist/doc/latex/examdesign/foobar.tex 3> less `r` locate foobar 4> precmd () { function> print -Pn "\e]0;[ %n@%m: %~ ]\a" function> } 5> locate foobar /usr/TeX/texmf-dist/doc/latex/examdesign/foobar.tex 6> less `r` locate foobar test@matamore:: No such file or directory /home/noirel is a directory ]/usr/TeX/texmf-dist/doc/latex/examdesign/foobar.tex: No such file or directory 7> precmd() is supposed to be executed once before each prompt (according to the man page) but here it is executed one more time, when "r" is executed. I think that either the behaviour or the man page is wrong and should therefore be corrected. Thank you for your time (and for zsh of course), -- Josselin Noirel