From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19813 invoked from network); 5 Apr 2000 09:43:44 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 5 Apr 2000 09:43:44 -0000 Received: (qmail 2327 invoked by alias); 5 Apr 2000 09:43:22 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10505 Received: (qmail 2320 invoked from network); 5 Apr 2000 09:43:21 -0000 Date: Wed, 5 Apr 2000 11:43:20 +0200 (MET DST) Message-Id: <200004050943.LAA02547@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Alexandre Duret-Lutz's message of 05 Apr 2000 11:28:48 +0200 Subject: Re: PATCH: Re: _arguments questions Alexandre Duret-Lutz wrote: > >>> "Sven" == Sven Wischnowsky writes: > > ... > > Sven> Because of that (;-) and because it isn't quite the same (but I > Sven> confess, I had the same idea...). Especially, adding this dummy > Sven> element might be useful to combine with both `::' and `:::'. > > An helper function ? > > _with_dummy_arg0 () { # I'm not good at finding names... > words=(dummy $words) > (( ++CURRENT )) > $@ > } > > _arguments -a -b '-c:*::blah: _with_dummy_arg0 _arguments -c -d -e' I thought about that, too. And then thought this could easily be put in _arguments, i.e. make it just look for a certain prefix in the action -- as if there were a function called. I couldn't find another use for this dummy-insertion-function... > Quite ugly, but looks understandable. But taht way we can't get > the 'parent' option (-c) for the dummy as you suggested. We could. _arguments itself would probably use the same it puts into $curcontext... (which in turn made me think that this wasn't so clever an idea anyway). Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de