Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Qmail-Scanner-Diagnostics: from nm14-vm1.bullet.mail.ir2.yahoo.com by f.primenet.com.au (envelope-from <okiddle@yahoo.co.uk>, uid 7791) with qmail-scanner-2.11 
 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1.  
 Clear:RC:0(212.82.96.189):SA:0(0.0/5.0):. 
 Processed in 0.289388 secs); 19 Jul 2016 10:37:03 -0000
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM,SPF_PASS,
	T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1
X-Envelope-From: okiddle@yahoo.co.uk
X-Qmail-Scanner-Mime-Attachments: |
X-Qmail-Scanner-Zip-Files: |
Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.mail.yahoo.com designates 212.82.96.189 as permitted sender)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1468924205; bh=QONlaSG1uEknaCWj9BBY0e9dNazmjDYqSGyQJjb8EGY=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=ESqyi6uxTjy/0C9CQIRwr7wLKA8DMS3E2CpFiLJCN4BMiQXROf66CzDi4B58EDaXaMAO3SbGLddqfvAU05TNVBKuwqSAkw1VKEMfbhdEIhIhXV8DRQ+6uhZwcckZN++1Oreu3Eiq/7XzA0khLGDFiyxAmDodDkBxeSgbKB2pQ9GnZZKirb9Pk6hCICBLRdQM+CHvfAfj/t8cG/aCc5g0d1sRT4NiOM0F0+Yek56O0aCb/bH13du/88H99LMEQW4AqocSKVURRNY7ZQza6cnHQ/SPcKBx+TnRd133OfV/OzyecARRw+bDdnkkT77G6Hvsrz4cKRczQqLVS4sE5ipipA==
X-Yahoo-Newman-Id: 952794.88346.bm@smtp148.mail.ir2.yahoo.com
X-Yahoo-Newman-Property: ymail-3
X-YMail-OSG: c5xBeZYVM1kPCh6xAGZll6g_P7QatmshdgvMSXRCyOOtwV1
 1AjGNonHI7sAFiwYyjoHsZmaQkkpUULkZq2vpduTNRVQ0JbnaIv22RokqAbo
 aTdn5rtsefwmfVFay6Hj5V6JsvmRtPZv8DkH42u8akKUeWa4xtRejWMmoQsY
 mB14tmApv4U.oDHE1bkii7QEju7FN6H3ufTnVzGnijhd3U1drPMXbn3sGOOK
 WqZbTdmMYQkd28ai5USEEy2rGuT5VCH6V3ZwszrxZxlTkqQssi9fb1MtV4mi
 V6AVzx9TZMTR1HEmnByJ7lhrCX6gIYcInDS8ypvb2KBRRhKYNzh6iXt.m.2C
 gnssIqAIvCbBVLNpPsZIond9X_op6K_ti9xI1FJEYNpIO.PB4cw3sI0Vql.V
 QpuEWqjruV69LLzBaKCc__ncMUkWG_aaQUdq..bnfEB93ua4wmH8zZQuYUfM
 SBwfVVdSMrMIraYe6t24VMEgim5Te2t0uyrXLzIzJ7XXPgTsdMQRHBuI5K0A
 GmgzLpaOnx1UmCmvorBmwnexLbuZFxRmabCdOcRNlB50-
X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI-
In-reply-to: <160718083025.ZM4767@torch.brasslantern.com>
From: Oliver Kiddle <okiddle@yahoo.co.uk>
References: <160716185103.ZM5258@torch.brasslantern.com> <1468767614-9635-1-git-send-email-danielsh@tarsus.local2> <91351.1468835277@hydra.kiddle.eu> <160718083025.ZM4767@torch.brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] _add-zle-hook-widget: New completion.
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <43718.1468924205.1@hydra.kiddle.eu>
Date: Tue, 19 Jul 2016 12:30:05 +0200
Message-ID: <43719.1468924205@hydra.kiddle.eu>
X-Seq: zsh-workers 38885

Bart wrote:
> } >  compadd "$@" -M 'L:|zle-=' -a hooktypes

> } 'B:zle-=' is a shorter version
>
> Might be worth mentioning that in the yodl page, I was going by the
> example of removing "no" from the front of setopt names.

After reading the documentation, it is apparent that there is a
difference. The B: form allows zle- to appear multiple times because the
zle- needs to be at that start of the match rather than at the start
of what's on the line. I've used this for numbers for initial zeros -
B:0= which is sometimes useful as a way to force a particular completion
alternative without contraining the matches. fc 0<tab> for example.

For the hook types, I wonder if the best choice might be -M 'L:|=zle-'
along with including zle- in the matches. That allows partial completion
to work.

Oliver

