zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk
Cc: 501851@bugs.debian.org
Subject: Re: Bug#501851: zsh: Completion fails if a directory name contains '(', ')' and 'Ą '.
Date: Tue, 14 Oct 2008 13:04:45 +0100	[thread overview]
Message-ID: <20081014130445.73a7033d@news01> (raw)
In-Reply-To: <48F3F9F5.1040009@inz.sakura.ne.jp>

On Tue, 14 Oct 2008 10:46:29 +0900
Morita Sho <morita-pub-en-debian@inz.sakura.ne.jp> wrote:
>   zstyle ':completion:*' matcher-list 'm:{[:lower:]}={[:upper:]}'
> 
> After removing the above line, the completion Ą/[TAB] works again.

Thanks for narrowing it down...  I'm aware that that syntax still needs
some work on it, it's only half-converted to supporting non-ASCII
characters, so it's probably not surprising this sort of thing happens.
The problem is the way characters are stored is quite specific to a
single-byte representation; I've made it so that it can be extended to
multibyte/wide characters, but it hasn't been.

I'm not going to get it properly converted before the next release since
it's a big job (I started it once back in June and got bogged down).  When
I get a chance, I'll look and see if there's any thing obvious I can do
with Meta-encoded characters that will work round the problem for now.

Until then you should be able to get away with the old syntax,

zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'

since before I finish the job it won't actually handle non-ASCII character
conversions properly anyway.

I will document my way round this as follows...

Index: Doc/Zsh/compwid.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/compwid.yo,v
retrieving revision 1.43
diff -u -r1.43 compwid.yo
--- Doc/Zsh/compwid.yo	14 Jul 2008 17:39:26 -0000	1.43
+++ Doc/Zsh/compwid.yo	14 Oct 2008 12:01:54 -0000
@@ -942,14 +942,16 @@
 completion you can use `tt(m:{[:lower:]}={[:upper:]})'.  Although the
 matching system does not yet handle multibyte characters, this is likely
 to be a future extension, at which point this syntax will handle
-arbitrary alphabets; hence this form, rather than the use of explicit
-ranges, is the recommended form.  In other cases
-`tt([:)var(name)tt(:])' forms are allowed.  If the two forms on the left
-and right are the same, the characters must match exactly.  In remaining
-cases, the corresponding tests are applied to both characters, but they
-are not otherwise constrained; any matching character in one set goes
-with any matching character in the other set:  this is equivalent to the
-behaviour of ordinary character classes.
+arbitrary alphabets; until then it is safer to use the older syntax
+that only handles ASCII characters, `tt(m:{a-z}={A-Z}) as this does
+not have side effects in the case of multibyte characters.
+
+In other cases `tt([:)var(name)tt(:])' forms are allowed.  If the two forms
+on the left and right are the same, the characters must match exactly.  In
+remaining cases, the corresponding tests are applied to both characters,
+but they are not otherwise constrained; any matching character in one set
+goes with any matching character in the other set:  this is equivalent to
+the behaviour of ordinary character classes.
 
 The pattern var(tpat) may also be one or two stars, `tt(*)' or
 `tt(**)'. This means that the pattern on the command line can match


-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


  reply	other threads:[~2008-10-14 12:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20081010230611.23133.42221.reportbug@debian>
2008-10-10 23:17 ` Clint Adams
2008-10-11 12:09   ` Richard Hartmann
2008-10-11 13:47   ` Morita Sho
2008-10-11 21:52     ` Peter Stephenson
2008-10-13  1:32       ` Morita Sho
2008-10-13  6:25         ` Richard Hartmann
2008-10-14  1:46           ` Morita Sho
2008-10-14 12:04             ` Peter Stephenson [this message]
2008-10-15  4:34               ` Morita Sho
2008-10-18 18:48                 ` Peter Stephenson
2008-10-19  6:00                   ` Morita Sho
2008-10-13  9:30         ` Peter Stephenson
2008-10-13 12:50           ` Richard Hartmann

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=20081014130445.73a7033d@news01 \
    --to=pws@csr.com \
    --cc=501851@bugs.debian.org \
    --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).