zsh-users
 help / color / mirror / code / Atom feed
* Completion fails to search in $PATH
@ 1999-04-01 19:28 Sameer Siruguri
  1999-04-01 19:39 ` Kevin Sullivan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sameer Siruguri @ 1999-04-01 19:28 UTC (permalink / raw)
  To: zsh-users

Hi.

When I create a new executable in some directory that is in my $PATH,
completion fails to add that to the list when I press TAB.  The new executable
is added only after I restart zsh. It seems that zsh is caching the completion
list and doesn't re-read the cache very often.

Is there some way I can get zsh to refresh the completion list after I have
made a change to it?

Thanks. Sameer.
--
Sameer Siruguri				  Graduate student, CS, Rice University
siruguri@cs.rice.edu	       713 630 9243           www.cs.rice.edu/~siruguri



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Completion fails to search in $PATH
  1999-04-01 19:28 Completion fails to search in $PATH Sameer Siruguri
@ 1999-04-01 19:39 ` Kevin Sullivan
  1999-04-01 19:41 ` Larry P . Schrof
  1999-04-02  5:03 ` Bart Schaefer
  2 siblings, 0 replies; 4+ messages in thread
From: Kevin Sullivan @ 1999-04-01 19:39 UTC (permalink / raw)
  To: siruguri; +Cc: zsh-users

Sameer Siruguri writes:
> Hi.
> 
> When I create a new executable in some directory that is in my $PATH,
> completion fails to add that to the list when I press TAB.  The new executable
> is added only after I restart zsh. It seems that zsh is caching the completion
> list and doesn't re-read the cache very often.
> 
> Is there some way I can get zsh to refresh the completion list after I have
> made a change to it?
> 
> Thanks. Sameer.
> --
> Sameer Siruguri				  Graduate student, CS, Rice University
> siruguri@cs.rice.edu	       713 630 9243           www.cs.rice.edu/~siruguri
> 
> 

When you add a new entry into your path you can refresh the cache with 
the builtin command 'rehash'. After that <TAB> should find your new
command(s). 

  -Kevin Sullivan


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Completion fails to search in $PATH
  1999-04-01 19:28 Completion fails to search in $PATH Sameer Siruguri
  1999-04-01 19:39 ` Kevin Sullivan
@ 1999-04-01 19:41 ` Larry P . Schrof
  1999-04-02  5:03 ` Bart Schaefer
  2 siblings, 0 replies; 4+ messages in thread
From: Larry P . Schrof @ 1999-04-01 19:41 UTC (permalink / raw)
  To: zsh-users

Use 'rehash'.

zsh hashes many things, including commands in PATH. I usually just
type rehash when I've put new stuff in my command path (IE installing
software packages). If it really bugs you to type rehash, you can have
zsh do so periodically, but this really doesn't solve the immediate
problem.

On Thu, Apr 01, 1999 at 01:28:51PM -0600, Sameer Siruguri wrote:
> Hi.
> 
> When I create a new executable in some directory that is in my $PATH,
> completion fails to add that to the list when I press TAB.  The new executable
> is added only after I restart zsh. It seems that zsh is caching the completion
> list and doesn't re-read the cache very often.
> 
> Is there some way I can get zsh to refresh the completion list after I have
> made a change to it?
> 
> Thanks. Sameer.
> --
> Sameer Siruguri				  Graduate student, CS, Rice University
> siruguri@cs.rice.edu	       713 630 9243           www.cs.rice.edu/~siruguri
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Completion fails to search in $PATH
  1999-04-01 19:28 Completion fails to search in $PATH Sameer Siruguri
  1999-04-01 19:39 ` Kevin Sullivan
  1999-04-01 19:41 ` Larry P . Schrof
@ 1999-04-02  5:03 ` Bart Schaefer
  2 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 1999-04-02  5:03 UTC (permalink / raw)
  To: Sameer Siruguri, zsh-users

On Apr 1,  1:28pm, Sameer Siruguri wrote:
} Subject: Completion fails to search in $PATH
}
} When I create a new executable in some directory that is in my $PATH,
} completion fails to add that to the list when I press TAB.

This appeared on zsh-workers a while back:

> On Jul 17,  9:36pm, Greg Badros wrote:
> } Subject: auto-rehashing?
> }
> } Can zsh auto-rehash when I hit tab a second consecutive time when
> } completing in a command position?
> 
> How about this:
> 
> function compctl_rehash { rehash; reply=() }
> compctl -C -c + -K compctl_rehash + -c
> 
> That says to try command completion, then if that fails, to rehash, and
> then (because compctl_rehash empties $reply) to try command completion a
> second time.
> 
> -- 
> Bart Schaefer                                 Brass Lantern Enterprises
> http://www.well.com/user/barts              http://www.brasslantern.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-04-02  5:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-04-01 19:28 Completion fails to search in $PATH Sameer Siruguri
1999-04-01 19:39 ` Kevin Sullivan
1999-04-01 19:41 ` Larry P . Schrof
1999-04-02  5:03 ` Bart Schaefer

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).