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

compinit dumps too many files for autoloading



If I am using a complicate completion such as _perforce which defines
its own functions, then run compinit again, all those functions are
marked for autoloading in .zcompdump.  This is problematic because the
functions in question are tested thus in _perforce (_cvs works
similarly):

(( $+functions[_perforce_filetypes] )) ||
_perforce_filetypes() {
 ...
}

When _perforce is loaded, the test sees that the function is already
marked for autoloading and doesn't define it.

It's not very serious since compinit isn't usually run again.  I'm not
sure what the fix is.  However, it's not clear to me compinit should be
marking files for autoload unless it found them by searching $fpath.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



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