zsh-users
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Gautam Iyer <gi1242+zsh@gmail.com>
Cc: zsh-users@zsh.org
Subject: Re: Rehash after installs
Date: Sun, 14 Aug 2011 17:02:13 +0200	[thread overview]
Message-ID: <CAHYJk3RmnSux+oH6Y8b23LRf4hrJgTk=N1K72=qGT=mh5W71Qw@mail.gmail.com> (raw)
In-Reply-To: <20110814144635.GC3824@andrew.cmu.edu>

On 14 August 2011 16:46, Gautam Iyer <gi1242+zsh@gmail.com> 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<tab> would give
you foobaza, while foobar<tab> would give foobara.

-- 
Mikael Magnusson


  reply	other threads:[~2011-08-14 15:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-13  6:53 Micah Elliott
2011-08-13  7:05 ` Sebastian Tramp
2011-08-14  4:03   ` gi1242+zsh
2011-08-14  4:37     ` Mikael Magnusson
2011-08-14 14:46       ` Gautam Iyer
2011-08-14 15:02         ` Mikael Magnusson [this message]
2011-08-15  2:47           ` gi1242+zsh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHYJk3RmnSux+oH6Y8b23LRf4hrJgTk=N1K72=qGT=mh5W71Qw@mail.gmail.com' \
    --to=mikachu@gmail.com \
    --cc=gi1242+zsh@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).