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

Re: Completing a unique prefix of "script" completes "script"



"Nikolai Weibull" <now@xxxxxxxx> wrote:
> It seems that the hash table is initialized after .zshrc is read.  Is
> there a way to run some scripts after everything is initiaziled?

Hmm... I haven't looked at the source but in my case it seems to
be being hashed straight away...

zsh -f -c 'zmodload -i zsh/parameter
print $commands[script]
unhash script
print $commands[script]'

prints /usr/bin/script the first time and nothing the second time.
/etc/zshenv is empty.  Aha---it looks like zsh/parameter is filling the
hash table itself (based on the HASHLISTALL option which is on by default).
So maybe putting

zmodload -i zsh/parameter

early in your initialization file (it'll probably be loaded by the completion
system later anyway) is good enough.
-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php



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