From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17057 invoked from network); 27 Apr 1999 15:46:13 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Apr 1999 15:46:13 -0000 Received: (qmail 28902 invoked by alias); 27 Apr 1999 15:45:54 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6123 Received: (qmail 28893 invoked from network); 27 Apr 1999 15:45:47 -0000 Message-ID: <3725DB97.CA9BBB4B@thoth.u-net.com> Date: Tue, 27 Apr 1999 16:45:27 +0100 From: Oliver Kiddle X-Mailer: Mozilla 4.51 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: Sven Wischnowsky , zsh-workers@sunsite.auc.dk Subject: Re: Completion in braces limitation References: <199904271337.PAA13588@beta.informatik.hu-berlin.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sven Wischnowsky wrote: > This was intentional, the completion gave up as soon as it found the `$'. > The patch below makes it try a little harder by looking at what comes > I would be thankful if someone (you?) could test this more thoroughly, > though. Brilliant. That seems to work well. I've tested it quite thoroughly but will do some more testing of it later (when I'm not at work). > Well, the new style completion can do this, of course... I really ought to find some time to try this new completion. One thing which I did notice while testing a few things out with completion in braces is that it doesn't work quite as I'd like with things of the form $(...). Try: zsh -f sw() { echo /home/native_rs6000 } cd $(sw)/{ This expands $(sw) and quotes the brace. There may be a reason for doing this but I can't think of one. Also (not using a brace), typing a bit more before the tab: cd $(sw)/tes will expand $(sw), leave '/tes' on the end and add a space. What would be nice is if it had completed to the 'test' directory which I have there. Back quotes behave in the same way. Another way that $(...) is treated differently to a variable regards when zsh expands it: cd $PWD - expands the value of $PWD cd $PWD/ - does not expand $PWD. I find this useful. cd $(sw)/ - this will expand $(sw). Finally, I noticed this behaviour: bindkey "^G" list-expand cd $PWD/<^G> This lists directories in $PWD after the first tab. I then listed the value of PWD with Ctrl-G, then wanting to go back to the list of directories, I pressed tab again. This started menu completion instead of returning to the list. I suppose I should remember to use Ctrl-D instead of tab again but if it's a simple change, it might be useful if things which overwrite the list (such as list-expand) revert things as if the original tab had not been pressed. Thanks Oliver Kiddle