zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@sunsite.dk (Zsh hackers list)
Subject: Re: zsh versus tcsh's "complete=enhance" (for Germans)
Date: Tue, 02 May 2006 22:53:07 +0100	[thread overview]
Message-ID: <200605022153.k42Lr7XS003301@pwslaptop.csr.com> (raw)
In-Reply-To: Your message of "Tue, 02 May 2006 10:56:33 BST." <EXCHANGE03wiZWnPkxi0000014e@exchange03.csr.com>

[-- 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/


           reply	other threads:[~2006-05-02 21:53 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <EXCHANGE03wiZWnPkxi0000014e@exchange03.csr.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200605022153.k42Lr7XS003301@pwslaptop.csr.com \
    --to=p.w.stephenson@ntlworld.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).