zsh-workers
 help / color / mirror / code / Atom feed
* Re: zsh versus tcsh's "complete=enhance" (for Germans)
       [not found] <EXCHANGE03wiZWnPkxi0000014e@exchange03.csr.com>
@ 2006-05-02 21:53 ` Peter Stephenson
  0 siblings, 0 replies; only message in thread
From: Peter Stephenson @ 2006-05-02 21:53 UTC (permalink / raw)
  To: Zsh hackers list

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1366 bytes --]

Peter Stephenson wrote:
> 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.

Guess what... it's not as easy as all that.

[Waits for gasps of amazement to subside.]

The current code appears to be broken with multibyte characters, in
fact, since it uses a lookup table of 256 characters.  The matcher
system is fairly heavily embedded into the completion code, so it may
well be too much like hard work to rewrite the whole thing using wide
characters.  However, it ought to be possible (if rather slower) to
store only the matcher pattern as wide characters and convert the
character for comparison on input, or alternatively simply determine the
multibyte character length each time (yuk) and use that to look for
substrings.

Anybody who feels strongly enough that the whole thing should be written
properly and efficiently is encouraged to do so...

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-05-02 21:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <EXCHANGE03wiZWnPkxi0000014e@exchange03.csr.com>
2006-05-02 21:53 ` zsh versus tcsh's "complete=enhance" (for Germans) Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).