Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh versus tcsh's "complete=enhance" (for Germans)

Andy Spiegl wrote:
> for case-insensitive German I am using this:
>  zstyle ":completion:*" matcher-list 'm:{A-Zöäüa-zÖÄÜ}={a-zÖÄÜA-Zöäü}'
> Is there a shorter way to write this?

It looks like equivalence classes (the braces in that pattern) for
completion matchers are fairly simply handled at present.  The code for
this part of the matching appears (for once) not to be too tortuous and
it ought to be possible to extend it.

You probably want to be able to do something like
'm:{[:upper:]}={[:lower:]}' in a manner similar to ranges in normal
pattern matching.  This ought to be doable by having isupper() tests and
tolower() conversions.  However, I haven't looked at the details.

The matcher code uses multibyte strings rather than wide characters, so
it looks like yet another conversion would be needed.  Probably the
matcher code is better done entirely with wide characters, but that
requires understanding it first...

Any further details should probably go to zsh-workers.

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