Zsh Mailing List Archive
Messages sorted by:
Re: Example of using "-command-line-" context?
- X-seq: zsh-workers 32460
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Example of using "-command-line-" context?
- Date: Mon, 03 Mar 2014 18:09:24 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1393866565; bh=Msju2H5cZFPLDSP/AvB37s3vpLPPryytKc9dqRL7B7E=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Received:In-reply-to:From:References:To:Subject:MIME-Version:Content-Type:Content-ID:Date:Message-ID; b=4X49AcNLbcYbWJNkFVEr3b63Fh0ZnSV9LBlYRTRe/Dx0WNx09KpE5R65JGH034Si7cyPA945TzwgrXDJbwq4mOLPrFy7xdqkRDklNGhYxv9bg+pecvZ0a76v1YzP9o4K72dEhjGCc3NqRvcKqJN45QlgAejOCKtdtK1NnjTlCaU=
- In-reply-to: <140302114357.ZM1081@torch.brasslantern.com>
- List-help: <mailto:email@example.com>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <140302114357.ZM1081@torch.brasslantern.com>
> 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
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.
Messages sorted by: