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

compinit as function?



Is there any real reason, why compinit cannot be a function?

The only problem as far as I can see is, that it defines several global
AA's - and current typeset's will make them local.

One workaround is to use

: ${(AA)hash:=}

(it is ugly, but it works)

Another possibility is to add the global flag to typeset: typeset -g. Can it
be useful in other cases?

Having compinit as function will allow to simply drop the whole stuff in
auoloaded fpath - and don't worry about path to compinit anymore. Of course,
then some other standard path to dump file is needed.

/andrej



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