Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: case insensitive completion
- X-seq: zsh-workers 25023
- From: Peter Stephenson <pws@xxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- Subject: Re: case insensitive completion
- Date: Wed, 14 May 2008 10:47:57 +0100
- In-reply-to: <482839D5.6070901@xxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Organization: CSR
- References: <482839D5.6070901@xxxxxxxxxxxxx>
On Mon, 12 May 2008 16:36:37 +0400
sergio <zsh@xxxxxxxxxxxxx> wrote:
> zstyle ':completion:*' matcher-list 'm:{а-яА-Я}={А-Яа-я}
> doesn't work
I think this really needs fixing a more general way. You don't care what
the character set is, you just want to make lower and upper case match. So
really you want to be able to use ctype-style character specifications:
zstyle ':completion:*' matcher-list \
'm:{[:lower:][:upper:]}={[:upper:][:lower:]}'
More general ctype tests would also be useful in:
compadd -M 'r:|[.,_-]=* r:|=*'
which could be
compadd -M 'r:|[[:punct:]]=* r:|=*'
and it's a bit confusing that that doesn't currently work---it's not
spelled out in the completion documentation.
That doesn't leave much for individual multibyte characters in
correspondence classes to do, but it still shouldn't be too difficult to
turn the tables into explicit sets of characters tested the way character
classes in globbing are tested (which is fully general, although based on
the wchar_t ordering, which isn't necessarily Unicode code points).
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author