Zsh Mailing List Archive
Messages sorted by:
Re: PATCH: Add $OVERSTRIKE in zle widgets
- X-seq: zsh-workers 28120
- From: Peter Stephenson <Peter.Stephenson@xxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: PATCH: Add $OVERSTRIKE in zle widgets
- Date: Tue, 3 Aug 2010 10:58:23 +0100
- In-reply-to: <87ocdkf2u1.fsf@xxxxxxxxxxxxxxxxxxxxxx>
- 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
- Organization: Cambridge Silicon Radio
- References: <1280797053-22520-1-git-send-email-ft@xxxxxxxxxxxxxxxxxxx> <20100803095219.24142dd6@xxxxxxx> <87ocdkf2u1.fsf@xxxxxxxxxxxxxxxxxxxxxx>
On Tue, 03 Aug 2010 11:44:06 +0200
Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx> wrote:
> How would you organise that information? In a string, where multiple
> characters would signify different states? Like ZLE_STATE='mo' meaning
> overwrite mode and a mini-buffer is active.
That's the kind of thing I had in mind, but strings are cheap nowadays, and
[[ ... ]] tests natural in the shell, so you might just it make it verbose
and contain "insert", "overwrite", "minibuffer insert", "minibuffer
overwrite", and test '[[ $ZLE_STATE = *overwrite* ]]', which is completely
unambiguous while the speed penalty is unnoticeable. Use of this idiom
makes it easy to upgrade the variable in a backward compatible way and
without variable namespace pollution.
I think the "minibuffer", such as it is, is tied to the "statusline"
variable. Some of the code associated with that is a bit grungy (yes, I
know, you're astonished), but mostly I think that's down to how the
minibuffer is generated rather than whether or how it's displayed.
Similarly, there's also "listshown" which relates to whether completion
lists are being displayed, which is somehow related to "showinglist".
Code associated with that is, er, completion code.
Peter Stephenson <pws@xxxxxxx> Software Engineer
Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK
Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
Messages sorted by: