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

Re: About menu selection (again)



On Aug 16,  2:05pm, Sven Wischnowsky wrote:
} 
} DervishD wrote:
} 
} > Since complist needs compctl to work, could it be added as a dependency?
} 
} That would be wrong because complist doesn't need compctl. It only
} `needs' some form of completion to be useful and the new completion
} system is only built on top of the more basic `complete' module.

The trouble is that the zsh/complete module is not a form of completion;
it's a collection of tools for building forms of completion.  It's useless
unless `zle -C' has been run and that widget calls `compadd'.

So the test in zle_tricky.c:docompletion for module_loaded("zsh/complete")
is woefully inadequate.  We need to at least test for `zle -C'.

Could we do something along the lines of shuffling the hookdefs so that
the completion hooks are not defined until `zle -C' runs the first time,
even if the zsh/complete module has been loaded?  And then test for the
presence of the hook rather than the presence of the module, and load
compctl if the hook doesn't exist?

-- 
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