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

Re: zsh - new user with questions





Hi Goran,

you make things more complicated than they are. In english there are also
numbers which
don't have an upper case equivalent. In those cases you represent those
characters as they
are, no one uses z to represent a lower case beta.

If you are familiar with the locale routines provided in the normal C
libraries, you'll know that
there are routines for converting strings from upper case to lower case and
vice-versa. These
routines are language independant, and only effect those characters which
have a upper/lower
case equivalent, all other characters in the string remain identical. (ever
seen an upper case space?)

All that is required is that all routines that compare file names need to
convert both strings for comparison
to lower (or upper) case before comparison. The advantage on the Amiga is
that if a file called ReadMe
exists, and you decide to create a file called README, all you end up doing
is overwriting the ReadMe file
(with the normal warnings you would get if you were to do that on any other
system)

The upshot is that you can be expressive with your file names, or you can
even be lazy, like the options
for zsh - setopt has even more magic, there you can user upper/lower case,
and you can insert underscores
anywhere you want - impressive! Maybe someone can use the same routine for
the expansion/completion stuff.
(ie: should not be restricted to files. variables, options, list entries
(compctl -k ...) etc should also be handled the
same way!

All the best, and thanks for listening,

Steve





hoh@xxxxxxxxxxxxxxxxxx on 19.08.98 15:53:31

To:   Stephen Riehm/Muenchen/pc-plus
cc:   zsh-users@xxxxxxxxxxxxxxx
Subject:  Re: zsh - new user with questions




On 19 Aug, Stephen Riehm wrote:

>  If there's a wishlist or a todo list for zsh, I would really like to add
>  this feature to it! (I personally think the Amiga
>  dudes got it right back in '86 when they made the file names were only
>  stores case sensitive - but all operations
>  at OS level were case insensitive - thus it was impossible to have
ReadMe
>  and README in the same directory.
>
>  I personally think this reduces possible confusion, (does make read
>  Makefile or makefile first?) and makes
>  case insensitive completion trivial. - just my 2cents)

This is trivial if you only care about filenames using A..Z and a..z.
For filenames using other characters this must turn into a nightmare.
Some languages does not have a 1:1 mapping between upper and lower
case letters. One such example is the German "doube s" ß. Imagine
a language where 'z' does not have an upper case version and is
written as 'S' instead.

Set the language setting to English and create the file "Tezt".

   Filename on disk:    Tezt
   Open with:           Test (no)   Tezt (yes)   TEST (no)   TEZT (yes)

Change the language setting to the other language and try again.

   Filename on disk:    Tezt
   Open with:           Test (no)   Tezt (yes)   TEST (yes)  TEZT (what?)

Confusing? Confuzing?

How does Amiga handle this? How does MS win9[58] handle this?

Isn't it much easier to just say that upper and lower case are
distinct letters?

--
 Goran Larsson            hoh@xxxxxxxxxx
 I was an atheist,        http://home1.swipnet.se/%7Ew-12153/
 until I found out I was God.






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