From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4620 invoked from network); 18 Aug 1998 16:33:33 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 18 Aug 1998 16:33:33 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id MAA13388; Tue, 18 Aug 1998 12:26:31 -0400 (EDT) Resent-Date: Tue, 18 Aug 1998 12:26:23 -0400 (EDT) Message-Id: <199808181628.SAA21807@hydra.ifh.de> X-Authentication-Warning: hydra.ifh.de: pws owned process doing -bs To: zsh-users@math.gatech.edu (Zsh users list), "Stephen Riehm" Subject: Re: zsh - new user with questions In-reply-to: ""Stephen Riehm""'s message of "Tue, 18 Aug 1998 17:33:42 MST." Date: Tue, 18 Aug 1998 18:28:45 +0200 From: Peter Stephenson Resent-Message-ID: <"jzdq4.0.eG3.kiQsr"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1731 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu "Stephen Riehm" wrote: > extreme short cuts. ie: with tcsh's enhanced completions, to complete > the file named: ReadMe.First > all I would type id: r.f - is there a way to do this sort of > thing in zsh? You can write your own function. See Functions/multicomp in the source distribution for examples. If you really can't type uppercase characters, you're going to have to redo the globbing there so that every lowercase character becomes e.g. [rR], then you'll need to handle .'s in the way /'s are handled there. Ignoring case may happen one day, but I doubt there's ever going to be a built-in way of saying 'look and see if there are any characters preceeding a dot to be added earlier on in the completion'. Maybe you would be interested in the options automenu and menucomplete. You'll have to find the shift key, however. Do 'setopt automenu', type R, and hit tab until it works. > - 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) You need ls -d, and it doesn't just show empty directories since the link count doesn't get incremented for plain files. I don't think you can do it in one glob expression. Best I can think of (using your glob to prune out non-terminal directories) is for f in ***/*(/l2); do foo=($f/*(N)); [[ -z $foo ]] && print $f; done *(N) turns on nullglob, i.e. $foo is empty if there was nothing in $f. > Is it possible to make > all cd's happen in relation to your logical position? This should happen with the option CHASE_LINKS unset. > Is it possible to say that it should complete > non-hidden directories, unless the text typed indicates > otherwise, ie: if I type "cd ", I get a list of all the normal > directories, but if I then type . it should use the > . and show me all the directories beginning with . With 3.1.4, -/ is a better way of doing it than -g; this will work as you want. For more general things like that, you probably need to wait until particular completions can be bound to particular keys, which should happen some time. -- Peter Stephenson Tel: +39 50 844536 WWW: http://www.ifh.de/~pws/ Gruppo Teorico, Dipartimento di Fisica Piazza Torricelli 2, 56100 Pisa, Italy