zsh-users
 help / color / mirror / code / Atom feed
* Problem with autocompletion
@ 2010-05-25 10:43 Andrea Morandini
  2010-05-25 11:03 ` Peter Stephenson
  2010-05-25 14:12 ` Bart Schaefer
  0 siblings, 2 replies; 3+ messages in thread
From: Andrea Morandini @ 2010-05-25 10:43 UTC (permalink / raw)
  To: zsh-users

Hi everybody,
			I have a noob question.

Zsh is much better than my previously bash, but I miss a very basic function.

When I try to autocomplete the file path, using TAB, i receive the following error:

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


So the first part of the string "cap staging deploy:upload FILES=" is typed by me, but when I try to autocomplete the last  part it fails.

Any suggestion on how to patch/debug ?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with autocompletion
  2010-05-25 10:43 Problem with autocompletion Andrea Morandini
@ 2010-05-25 11:03 ` Peter Stephenson
  2010-05-25 14:12 ` Bart Schaefer
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 2010-05-25 11:03 UTC (permalink / raw)
  Cc: zsh-users

On Tue, 25 May 2010 12:43:32 +0200
Andrea Morandini <andreamorandini@gmail.com> 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@csr.com>            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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with autocompletion
  2010-05-25 10:43 Problem with autocompletion Andrea Morandini
  2010-05-25 11:03 ` Peter Stephenson
@ 2010-05-25 14:12 ` Bart Schaefer
  1 sibling, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 2010-05-25 14:12 UTC (permalink / raw)
  To: Zsh Users

On Tue, May 25, 2010 at 3:43 AM, Andrea Morandini
<andreamorandini@gmail.com> 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

This seems to indicate that TAB has been bound to a function that was
installed as a normal widget rather than as a completion widget (via
"zle -C"), although I would have expected things to fail a lot sooner
in that event.  What output do you get from

bindkey ^I

(that is, bindkey with only one argument, which is caret capital eye)?

What do you get if, instead of TAB, you type control-X question-mark
after the equal sign?


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-05-25 14:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-25 10:43 Problem with autocompletion Andrea Morandini
2010-05-25 11:03 ` Peter Stephenson
2010-05-25 14:12 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).