From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28370 invoked by alias); 14 Aug 2011 15:02:19 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16216 Received: (qmail 20240 invoked from network); 14 Aug 2011 15:02:18 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.220.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=uv7CJpXYHGH6WMiHkQ4YGlo4if585J1ocwDCkY3MivI=; b=r9A+T5VVJt7aBybwP97QcEkv0zmy42aq5/T7qE+hV3usA2f/J/hKF1d3g/BqRiXxkO bHQIii1SPkoYXvVcWHSzWoElaq+/gCV7DzsGAPF6gClqDZHVyR9BGe8IeOVufpVFVrV8 JiIbeZK83CIlKFJfGNniNzh6990ckYLJGqj+M= MIME-Version: 1.0 In-Reply-To: <20110814144635.GC3824@andrew.cmu.edu> References: <20110813070535.GA10909@soljaris7.fritz.box> <20110814040306.GC32168@andrew.cmu.edu> <20110814144635.GC3824@andrew.cmu.edu> Date: Sun, 14 Aug 2011 17:02:13 +0200 Message-ID: Subject: Re: Rehash after installs From: Mikael Magnusson To: Gautam Iyer Cc: zsh-users@zsh.org Content-Type: text/plain; charset=UTF-8 On 14 August 2011 16:46, Gautam Iyer wrote: > On Sun, Aug 14, 2011 at 06:37:52AM +0200, Mikael Magnusson wrote: > >>> Another (perhaps nicer) solution would be to "rehash" if command >>> completion failed, and then retry completion after that. >>> >>> This way even with a GUI installation program you'll get current >>> completion info. I've no idea how to implement it though; so if someone >>> does it (or has already done it), please let me know. >> >> You mean something like >> zstyle ':completion:*' rehash true > > Indeed! Thanks for telling me about this. > > The man page however seems to say that a rehash is issued on *every* > external command completion request. Is it possible to rehash only on > every *failed* external command completion request. > > I guess it doesn't really matter so much as I can't (yet) notice too > much of a performance penalty. Sure, but then you would still get incorrect completions as long as you typed something that can be completed to another command, ie you installed foobara and had foobaza already, so fooba would give you foobaza, while foobar would give foobara. -- Mikael Magnusson