zsh-users
 help / color / mirror / code / Atom feed
* RE: zsh - new user with questions
@ 1998-08-20 11:27 Stephen Riehm
  0 siblings, 0 replies; 15+ messages in thread
From: Stephen Riehm @ 1998-08-20 11:27 UTC (permalink / raw)
  To: zsh-users


> I normally use menu completion, and would expect it to be as following:
> the list of possible matches is built case-insensitive (using whatever
current locale says),
> but the choices are present as is. That is, giving readme, Readme and
ReadMe, pressing "less
> rTAB" would list all three files as is. So, I would have full control
over which file to
> select.
> /Andrej
This is exactly what I'm talking about!

Steve



^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: zsh - new user with questions
@ 1998-08-19 15:09 Stephen Riehm
  1998-08-19 17:35 ` Goran Larsson
  0 siblings, 1 reply; 15+ messages in thread
From: Stephen Riehm @ 1998-08-19 15:09 UTC (permalink / raw)
  To: hoh; +Cc: zsh-users

[-- Attachment #1: Type: text/plain, Size: 1702 bytes --]




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@lorelei.approve.se on 19.08.98 15:53:31

To:   Stephen Riehm/Muenchen/pc-plus
cc:   zsh-users@math.gatech.edu
Subject:  Re: zsh - new user with questions




[-- Attachment #2: Type: text/plain, Size: 1627 bytes --]



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@approve.se
 I was an atheist,        http://home1.swipnet.se/%7Ew-12153/
 until I found out I was God.





^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: zsh - new user with questions
@ 1998-08-19 12:34 Stephen Riehm
  1998-08-19 13:53 ` Goran Larsson
  1998-08-19 16:03 ` Bart Schaefer
  0 siblings, 2 replies; 15+ messages in thread
From: Stephen Riehm @ 1998-08-19 12:34 UTC (permalink / raw)
  To: zsh-users




Hi Again,



firstly, thanks to all those who replied, some of the tips were exactly
what I was looking for.



The expand-or-complete-prefix tip however didn't work, as then the -list
function only works when you've

already typed something. ie:



     cd /usr/<tab>



doesn't complete, and doesn't produce a list - ( I don't like using the
menu stuff, by the time I've hit tab 50 times

I could have easily typed any name I might be searching for), first when
you type another character does it start

showing lists again, ie:



     cd /usr/l<tab>

     lib/ local/



The way I work at the moment, I used the expand-or-complete-or-list
functionality instead of

having to use 'ls' all the time - which works great with case-insensitive
completion and list-when-ambiguous.

(ie: I often provide support by phone, they tell me to cd to
/home/user/Dev/ProductTest-1.2 - spoken as

slash home user dev product test one point two. I'm sure you can see where
case insensitivity and list-when-ambiguous

comes in really handy here. in tcsh I'ld probably type
/home/user/dev<tab>prod.2<tab> and I'ld be there, or if there

was an ambiguity, I'ld imediately see what choices I had.)

I'm not really complaining, I just find these features extremely helpful,
and I miss them a lot :-)



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)



Thanks again,



Steve



^ permalink raw reply	[flat|nested] 15+ messages in thread
* zsh - new user with questions
@ 1998-08-18 15:33 Stephen Riehm
  1998-08-18 16:17 ` Matthew Lovell
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Stephen Riehm @ 1998-08-18 15:33 UTC (permalink / raw)
  To: zsh-users




Hi guys,



I know - first read the FAQ, then the man pages - done that and more and
I've still got the following questions:

(background: I'm a tcsh power-user - but due to politically induced
technical problems, I'm looking for something

more ksh compatible, but which can do a whole lot more - zsh)



     - extended completion. I'm terribly used to never having to type
UPPERCASE letters, and using

     extreme short cuts. ie: with tcsh's enhanced completions, to complete
the file named: ReadMe.First

     all I would type id: r.f<tab> - is there a way to do this sort of
thing in zsh?



     - I tried use ls ***/*(/l2) to find all the empty directories in a
tree, but it didn't work, instead it counted the number

     of directories in each directory (I think, I wasn't quite sure what it
was doing)



     - if you cd through a link, the prompt correctly knows where you are
logically, but cd'ing back up again

     with cd .. puts you in the directory above the physical directory in
which you were. Is it possible to make

     all cd's happen in relation to your logical position?



     - raw completions: the completion mechanism is quite nice, even if I
haven't totally groked it yet, but

     occaisonally I want to perform completions which are normally
disallowed by compctl. The simplest example is

     cd. "compctl -g '*(-/)' cd" will complete nicely, unless I want to cd
into a hidden (dot) directory. Then it doesn't

     complete at all. Is it possible to say that it should complete
non-hidden directories, unless the text typed indicates

     otherwise, ie: if I type "cd <tab>", I get a list of all the normal
directories, but if I then type .<tab> it should use the

     . and show me all the directories beginning with .



I've got lots of other questions, but they aren't as annoying as the ones
above. HAve any of you done anything in this direction

before?



Thanks in advance,



Steve



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~1998-08-20 11:37 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-08-20 11:27 zsh - new user with questions Stephen Riehm
  -- strict thread matches above, loose matches on Subject: below --
1998-08-19 15:09 Stephen Riehm
1998-08-19 17:35 ` Goran Larsson
1998-08-19 19:18   ` Bart Schaefer
1998-08-19 19:58     ` Roland Jesse
1998-08-20  9:47       ` Andrej Borsenkow
1998-08-19 12:34 Stephen Riehm
1998-08-19 13:53 ` Goran Larsson
1998-08-19 16:03 ` Bart Schaefer
1998-08-18 15:33 Stephen Riehm
1998-08-18 16:17 ` Matthew Lovell
1998-08-18 16:28 ` Peter Stephenson
1998-08-18 22:46   ` David Hedbor
1998-08-19  1:21     ` Bart Schaefer
1998-08-18 16:43 ` Zefram

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).