From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5321 invoked from network); 24 Jul 2006 12:02:28 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) 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.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 24 Jul 2006 12:02:28 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 64881 invoked from network); 24 Jul 2006 12:02:22 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 24 Jul 2006 12:02:22 -0000 Received: (qmail 15626 invoked by alias); 24 Jul 2006 12:02:09 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10548 Received: (qmail 15617 invoked from network); 24 Jul 2006 12:02:07 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 24 Jul 2006 12:02:07 -0000 Received: (qmail 63270 invoked from network); 24 Jul 2006 12:02:07 -0000 Received: from cluster-c.mailcontrol.com (168.143.177.190) by a.mx.sunsite.dk with SMTP; 24 Jul 2006 12:02:07 -0000 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly21c.srv.mailcontrol.com (MailControl) with ESMTP id k6OC1hxm015101 for ; Mon, 24 Jul 2006 13:02:03 +0100 Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Mon, 24 Jul 2006 13:01:44 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.13.4/8.13.4) with ESMTP id k6OC1X0b016417 for ; Mon, 24 Jul 2006 13:01:33 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.13.4/8.13.4/Submit) with ESMTP id k6OC1SO7016414 for ; Mon, 24 Jul 2006 13:01:33 +0100 Message-Id: <200607241201.k6OC1SO7016414@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-users@sunsite.dk Subject: Re: chpwd() and completions functions In-reply-to: <20060724115117.GA8050@portfolio16.de> References: <20060724115117.GA8050@portfolio16.de> Comments: In-reply-to Tobias Gruetzmacher message dated "Mon, 24 Jul 2006 13:51:17 +0200." Date: Mon, 24 Jul 2006 13:01:28 +0100 From: Peter Stephenson X-OriginalArrivalTime: 24 Jul 2006 12:01:44.0606 (UTC) FILETIME=[EEBCBBE0:01C6AF18] Content-Type: text/plain MIME-Version: 1.0 X-Scanned-By: MailControl A-07-00-10 (www.mailcontrol.com) on 10.67.0.131 Tobias Gruetzmacher wrote: > I have a slight problem here: My chpwd() function is messing up some > completions. For example, the darcs completion has: > > print $(cd $root; pwd -P) > > This triggers my chpwd() function, so the output ends up containing the > stuff my chpwd() function is writing out, which makes the completion > system break at this point. Any ides how to fix this problem? The completion system closes stdin so that normal output doesn't go to the terminal. You can detect this in your chpwd: chpwd() { if [[ -t 0 ]]; then # stuff with normal terminal. fi } -- 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