Possible Duplicate:
rebuild auto-complete index (or whatever it's called)
After I install something via aptitude, zsh won't be able to find it until I search for it with which
. For example
~ sudo apt-get install xsane
~ xsa<Tab>
~ saned
~ which xsane
/usr/bin/xsane
~xsa<Tab>
~xsane
This naturally is pretty annoying. Is there a zsh setting for this? Or is it a bug? Or what?
zstyle ":completion:*:commands" rehash 1
. There is a performance cost, but it is negligible on a typical desktop setting today. (It isn't if you have$PATH
on NFS, or a RAM-starved system.) For a one-time need, runrehash
to rebuild the command cache. – Gilles 'SO- stop being evil' Nov 08 '10 at 01:55hash_list_all
isn't it? Well, I'll reopen this; if it is a dupe it can always be closed again and merged – Michael Mrozek Nov 08 '10 at 01:59hash_list_all
and it didn't work. I'm seeing the same behaviour. – Falmarri Nov 08 '10 at 02:41zstyle ":completion:*:commands" rehash 1
works in Zsh 4.3.3 and later. – Chris Johnsen Nov 08 '10 at 06:33