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

Re: Forgetting about compinit with manual alteration of _comps



On Wed, Feb 10, 2016 at 11:28 AM, Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> wrote:
> On 10 February 2016 at 10:23, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
>> However, I'm not sure making a plugin loadable _either before or after_
>> compinit is a good idea.  It may be simpler for plugin authors to expect
>> to be loaded in one circumstance (say, after compinit) and ensure they
>> emit a clear error message in the other circumstance (say, before
>> compinit), than to eternally support two codepaths.
>
> All this is a frustration about "compinit does everything". If there
> was "compinit" and "compinit_examine_fpath", it would be all much
> simpler. User would init completion at beginning of .zshrc, which is a
> natural location for "init" things, and then "compinit_examine_fpath"
> at end, which is also natural. All this resolved by providing
> compdef() stub gathering compdef calls and allowing to replay them
> after compinit placed at bottom of .zshrc.

Another thought is designing a plugin interface designed around how
zsh actually works, rather than bending over backwards to accomodate
cargo culted code that barely works in the first place.

-- 
Mikael Magnusson



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