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

Re: Problem with autocompletion



On Tue, 25 May 2010 12:43:32 +0200
Andrea Morandini <andreamorandini@xxxxxxxxx> wrote:

> cap staging deploy:upload FILES=my_app_dir/the_file_i_would_to_autocomp
> _cap:compadd:7: can only be called from completion function

"_cap" isn't a standard completion function supplied with the shell, so it
looks to me like something funny is going on in there.  Find out what
that's doing and how it's been configured---does it have "#compdef cap" at
the start and does "print $_comps[cap]" output "_cap"?  The file
_cap will be somewhere in the list of directories you see with
"print -l $fpath" ("print ${^fpath}/_cap(N)" should tell you where
it is).

I presume you have run "compinit" in .zshrc to load the completion
system?  _cap is clearly assuming it's present (but for some reason finding
it isn't).

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


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom



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