zsh-workers
 help / color / mirror / code / Atom feed
* Example of using "-command-line-" context?
@ 2014-03-02 19:43 Bart Schaefer
  2014-03-03 17:09 ` Oliver Kiddle
  0 siblings, 1 reply; 2+ messages in thread
From: Bart Schaefer @ 2014-03-02 19:43 UTC (permalink / raw)
  To: zsh-workers

The _normal function installs itself with "#compdef -command-line-" but, as
the documentation explains, nothing uses that context.

This must be intended as an entry point for user-defined widgets that don't
want to invoke the entire compsys machinery?  If not that, then what?  It's
mentioned in http://www.zsh.org/mla/workers/2000/msg02232.html as a helper
for completing after the "zse" (zstyle edit) function, but there was no
follow-up showing it actually put to use.

-- 
Barton E. Schaefer


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

* Re: Example of using "-command-line-" context?
  2014-03-02 19:43 Example of using "-command-line-" context? Bart Schaefer
@ 2014-03-03 17:09 ` Oliver Kiddle
  0 siblings, 0 replies; 2+ messages in thread
From: Oliver Kiddle @ 2014-03-03 17:09 UTC (permalink / raw)
  To: zsh-workers

Bart wrote:
> The _normal function installs itself with "#compdef -command-line-" but, as
> the documentation explains, nothing uses that context.
> 
> This must be intended as an entry point for user-defined widgets that don't
> want to invoke the entire compsys machinery?  If not that, then what?  It's
> mentioned in http://www.zsh.org/mla/workers/2000/msg02232.html as a helper
> for completing after the "zse" (zstyle edit) function, but there was no
> follow-up showing it actually put to use.

I think the intention is functions using vared that do want to invoke
the compsys machinery.

Normally, vared just gives you filename completion,
  compcontext="-command-line-" vared -c foo
treats it as a single command-line. It doesn't look ideal for zse as
there's no splitting on newlines.

I can't say I have a real example, though I have used compcontext with
other values.

I've also got a script using vared that does completely avoid compsys.
It uses zle -C explicitly and also needs to do stuff with
compstate[insert] that _main_complete normally does for you.

Oliver


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

end of thread, other threads:[~2014-03-03 17:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-02 19:43 Example of using "-command-line-" context? Bart Schaefer
2014-03-03 17:09 ` Oliver Kiddle

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