Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] _add-zle-hook-widget: New completion.
- X-seq: zsh-workers 38885
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] _add-zle-hook-widget: New completion.
- Date: Tue, 19 Jul 2016 12:30:05 +0200
- 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==
- In-reply-to: <160718083025.ZM4767@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- 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>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author