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

Re: completion for dummies, compinit for neophobes?



On Tue, 7 Oct 2008 08:59:52 +0800
"Aaron Davies" <aaron.davies@xxxxxxxxx> wrote:
> is there a way to set up compinit completion so as to produce exactly
> the same results in all cases as "default" completion?

There is certainly no way of producing *exactly* the same results, since
massively more completions are enabled on purpose, but the basic options
for what happens when you hit tab etc. are the same as with the old system,
so you shouldn't need to change anything.  The options like AUTO_LIST,
BASH_AUTO_LIST, MENU_COMPLETE, etc., as given in the zshoptions manual page
have just the same effect.

> pursuant to that, my second question: is there a guide to completion
> that's oriented towards working on one specific feature at a time
> (e.g., just add hostname completion for ssh)?

If you need a guide, there are two I know about: the one online at
http://zsh.sourceforge.net/Guide/zshguide.html (look for chapter 6), and
the book, see http://www.bash2zsh.com/ .  However, you're never going to
find a guide that tells you how to configure every possible command.  For
things like host names, you need to know about styles as described in the
zshcompsys manual page.  The style in question is "hosts" and there is
an example for it in the overview section of "Completion System
Configuration".

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



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