From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3919 invoked by alias); 3 Mar 2014 17:16:25 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32460 Received: (qmail 9143 invoked from network); 3 Mar 2014 17:16:10 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.2 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= X-Yahoo-Newman-Id: 374334.62463.bm@smtp124.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: JlgM6qsVM1kBTpHQOSZWnXIyn6tnQMk5wC7_AG7rrTOcpca Lj8SfQB0rTh_mD3POUnFliTs3V110JTvBLNgcAHWeOvgojyRJTAuuErh4d0T QvD5XPbLYO5VdpGSsqnd0rUV.iRQWHAufpt7iOK5WI.37E9Or22EXjvZ_3ky jcVfVsDqLEy0haHmxfeS9OGcyA.2dV0.xjtFJWGQMWD24YjtGEBKDxX3QpfI DTrbT4Qci6oxNoZfuO0webzue39pl2eTuavpySkFhJfnVtsZUKDNvFYckTwk OdLhIJdVmoWo9jGqKUMzuAKjp4_5cHGwpJ36pu.PMQcL6syrXhA9U.PlsxLN Dk_ivY6bnEDWzc72HdpZbAeG4XUfxqEEnFx59w9GPCkKwmAfrbt62NSfGx4H 7j2EjdwXx.EGlfKSC0HOmk9icsCq_W4M3l0bhINaTVyoM0s0p5edVX7i6v64 YM07ai.IizCjf8UaKJwG1Cy.jALrbJmqg7UuaqHJT6KaNGD1JqZDX1vZuN4q fThywXhlnyx8tX4aQqj9kYgiLg_wJBuMq0H1AsReE2AQrhgLUnySLL.1vPI5 SMig7NvfPmAxTIjA7babJ5j1iCWJhjsX3LuY1Qc_zPS3x390j4s2tjIeWSss - X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- X-Rocket-Received: from kiddle.eu (okiddle@95.222.208.151 with plain [188.125.69.59]) by smtp124.mail.ir2.yahoo.com with SMTP; 03 Mar 2014 17:09:25 +0000 UTC In-reply-to: <140302114357.ZM1081@torch.brasslantern.com> From: Oliver Kiddle References: <140302114357.ZM1081@torch.brasslantern.com> To: zsh-workers@zsh.org Subject: Re: Example of using "-command-line-" context? MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1991.1393866564.1@thecus.kiddle.eu> Date: Mon, 03 Mar 2014 18:09:24 +0100 Message-ID: <1992.1393866564@thecus.kiddle.eu> 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