zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@zsh.org
Subject: Re: Example of using "-command-line-" context?
Date: Mon, 03 Mar 2014 18:09:24 +0100	[thread overview]
Message-ID: <1992.1393866564@thecus.kiddle.eu> (raw)
In-Reply-To: <140302114357.ZM1081@torch.brasslantern.com>

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


      reply	other threads:[~2014-03-03 17:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-02 19:43 Bart Schaefer
2014-03-03 17:09 ` Oliver Kiddle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1992.1393866564@thecus.kiddle.eu \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).