zsh-workers
 help / color / mirror / code / Atom feed
* auto-rehashing?
@ 1998-07-18  4:36 Greg Badros
  1998-07-20  8:22 ` auto-rehashing? Zefram
  1998-07-23 18:34 ` auto-rehashing? Bart Schaefer
  0 siblings, 2 replies; 3+ messages in thread
From: Greg Badros @ 1998-07-18  4:36 UTC (permalink / raw)
  To: zsh-workers

Can zsh auto-rehash when I hit tab a second consecutive time when
completing in a command position?  I often add executable scripts to my
path on the fly, and it's an annoyance to have to C-c, then rehash, then 
retype the partial script name and then re-complete.

Thanks,
Greg


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

* Re: auto-rehashing?
  1998-07-18  4:36 auto-rehashing? Greg Badros
@ 1998-07-20  8:22 ` Zefram
  1998-07-23 18:34 ` auto-rehashing? Bart Schaefer
  1 sibling, 0 replies; 3+ messages in thread
From: Zefram @ 1998-07-20  8:22 UTC (permalink / raw)
  To: Greg Badros; +Cc: zsh-workers

Greg Badros wrote:
>Can zsh auto-rehash when I hit tab a second consecutive time when
>completing in a command position? 

compctl -C -K cmd-comp -c
function cmd-comp {
	rehash
}

This rehashes on all command name completions.

-zefram


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

* Re: auto-rehashing?
  1998-07-18  4:36 auto-rehashing? Greg Badros
  1998-07-20  8:22 ` auto-rehashing? Zefram
@ 1998-07-23 18:34 ` Bart Schaefer
  1 sibling, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 1998-07-23 18:34 UTC (permalink / raw)
  To: Greg Badros, zsh-workers

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] 3+ messages in thread

end of thread, other threads:[~1998-07-23 18:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-07-18  4:36 auto-rehashing? Greg Badros
1998-07-20  8:22 ` auto-rehashing? Zefram
1998-07-23 18:34 ` auto-rehashing? 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).