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

Re: How completions work, do they require fpath?



On Jan 28,  8:37am, Sebastian Gniazdowski wrote:
}
} One thing emerged - I was expecting that empty say "_cp" will just be
} ignored, because of lack of #compdef, however it isn't - it blocks
} other "_cp" files from loading.

That doesn't have anything to do with compinit, that's just the way
autoloading always works.  Compinit marks the names to be autoloaded,
but it doesn't control where they come from when autoloading finally
happens.  This was bashed out in agonizing detail with Ray Andrews
back in September.

The reload-and-run trick could circumvent this, that is, if your
autoload shadow were defined before compinit runs, then all of the
functions it touches would load from the place they were found at
compinit time rather than at execution time.

But it would make compinit a bit slower and use a bit more memory.



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