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

Re: Moving completion functions



On Mar 15,  8:50pm, Oliver Kiddle wrote:
} Subject: Re: Moving completion functions
}
} When I last moaned about $fpath being set, it was probably together
} with the why is compinit autoloaded and not sourced question. The most
} compelling answer was because of the need for autoload -U to avoid
} aliases. We now have the noalias option so compinit could be sourced.

Aliasing is not the only reason for making compinit a function.  It also
uses quite a few local parameters, "emulate -L zsh", and extendedglob.
Those are all messy to deal with in a sourced file.

I suppose we could do the usual trick of wrapping most of the contents of
the compinit file in a function definition and then calling that function
at the end ... or maybe we need two versions of compinit, one to be used
as a function and one as a source-able file (and have one call the other,
it probably doesn't matter which is the "outer layer").

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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