Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: auto-rehashing?



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



Messages sorted by: Reverse Date, Date, Thread, Author