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

Re: Question: completion listing



Sven Wischnowsky wrote:
> 
> If you have a file `Maße', this appears in a completion list as
> `Ma\M-_e' since metafied characters are treated specially.
> 
> I vaguely remember a discussion about this but I don't remember why it 
> was decided to print them in this way (and I mean metafied characters
> that are printable). Or was this just an oversight? Giving people
> using such filenames what they deserve?

It was neither, really:  it's to do with locales.  If your locale says
that scharfes S is a letter, then it appears as a letter in the
listing; if not, not.  Arguably there could be some internal way of
by-passing it.  I produced an FAQ entry on the subject (q.v.), but
there was some suggestion at the time this wasn't really adequate.
(Surprise:  the AIX system here doesn't have locales installed.)
I've appended it as it now stands for convenience.  Maybe a simple
option (EIGHT_BIT_CHARS or whatever) to cover standard cases like
ISO-8859-* would be a better idea?


3.7: How do I make the completion list use eight bit characters?

  A traditional UNIX environment (character terminal and ASCII
  character sets) is not sufficient to be able to handle non-ASCII
  characters, and there are so many possible enhancements that in
  general this is hard.  However, if you have something like an xterm
  using a standard character set like ISO-8859-1 (which is often the
  default for xterm), read on.  You should also note question
  3.5 on the subject of eight bit characters.

  You are probably creating files with names including non-ASCII
  accented characters, and find they show up in the completion list as
  \M-i or something such.  This is because the library routines
  (not zsh itself) which test whether a character is printable have
  replied that it is not; zsh has simply found a way to show them
  anyway.

  The answer, under a modern POSIXy operating system, is to find a
  locale where these are treated as printable characters.  Zsh has
  handling for locales built in and will recognise when you set a
  relevant variable. You need to look in /usr/lib/locale to find one
  which suits you; the subdirectories correspond to the locale names.
  The simplest possibility is likely to be en_US, so that the simplest
  answer to your problem is to set

    LC_CTYPE=en_US

  when your terminal is capable of showing eight bit characters.  If
  you only have a default domain (called C), you may need to have some
  additional files installed on your system.

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy



Messages sorted by: Reverse Date, Date, Thread, Author