From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20709 invoked from network); 25 Apr 2005 07:44:09 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 25 Apr 2005 07:44:09 -0000 Received: (qmail 78852 invoked from network); 25 Apr 2005 07:44:00 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 25 Apr 2005 07:44:00 -0000 Received: (qmail 5423 invoked by alias); 25 Apr 2005 07:43:56 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21177 Received: (qmail 5410 invoked from network); 25 Apr 2005 07:43:56 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 25 Apr 2005 07:43:56 -0000 Received: (qmail 78631 invoked from network); 25 Apr 2005 07:43:55 -0000 Received: from mail36.messagelabs.com (193.109.254.211) by a.mx.sunsite.dk with SMTP; 25 Apr 2005 07:43:49 -0000 X-VirusChecked: Checked X-Env-Sender: okiddle@yahoo.co.uk X-Msg-Ref: server-8.tower-36.messagelabs.com!1114415015!16575212!1 X-StarScan-Version: 5.4.11; banners=-,-,- X-Originating-IP: [158.234.9.163] Received: (qmail 21667 invoked from network); 25 Apr 2005 07:43:35 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-8.tower-36.messagelabs.com with SMTP; 25 Apr 2005 07:43:35 -0000 Received: from trentino.logica.co.uk ([158.234.142.59]) by iris.logica.co.uk (8.12.3/8.12.3/Debian -4) with ESMTP id j3P7hmZe014330; Mon, 25 Apr 2005 08:43:48 +0100 Received: from trentino.groupinfra.com (localhost [127.0.0.1]) by trentino.logica.co.uk (Postfix) with ESMTP id C7A1938123; Mon, 25 Apr 2005 09:43:27 +0200 (CEST) X-VirusChecked: Checked X-StarScan-Version: 5.0.7; banners=.,-,- In-reply-to: <20050415111158.GA1709@s> From: Oliver Kiddle References: <20050414134703.GA7862@s> <20050415111158.GA1709@s> To: zsh-workers@sunsite.dk Cc: Haakon Riiser Subject: Re: Updated _acroread completer Date: Mon, 25 Apr 2005 09:43:27 +0200 Message-ID: <7344.1114415007@trentino.groupinfra.com> 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=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 On 15 Apr, Haakon Riiser wrote: > I have now tried the non-local variable trick, and it works just > like I expected. I also noticed that the zsh completion system > has a set of caching functions (_store_cache, _retrieve_cache and > _cache_invalid). These functions apparently store data on disk, I never use those and don't really like them. I prefer completion to be slow the first time I complete something than for it to be out-of-date. > # The output of acroread -version cannot be piped to stdout for some reason, so > # the version number must be read from ACROREAD-PREFIX/Reader/AcroVersion. > # Since acroread might have been started via a wrapper script, the only > # failsafe way of determining ACROREAD-PREFIX is to look at the output of > # acroread -help. Unfortunately, this doesn't work on the system I tried it on, using Adobe's rpm. /usr/bin/acroread is a symbolic like to /usr/local/Adobe/Acrobat7.0/bin/acroread. Handling that involves using ls to get the symlink destination. Is acroread always a script? The following works well (and very quickly) on any system I have access to: grep '^ver=' =acroread >>From a completion function, we can use $commands[$words[1]] instead of =acroread. Oliver