From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11193 invoked from network); 21 Aug 2000 08:00:41 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 21 Aug 2000 08:00:41 -0000 Received: (qmail 19576 invoked by alias); 21 Aug 2000 08:00:29 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12682 Received: (qmail 19565 invoked from network); 21 Aug 2000 08:00:28 -0000 Date: Mon, 21 Aug 2000 10:00:18 +0200 (MET DST) Message-Id: <200008210800.KAA00733@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Oliver Kiddle's message of Fri, 18 Aug 2000 15:43:18 +0100 Subject: Re: PATCH: _zmodload Oliver Kiddle wrote: > ... > > Well here is the _arguments version and I've also tried to make use of > the $modules parameter where possible. Is my strategy of retricting the > arguments to _tags and then completing everything in the while _tags > loop okay? It seems to work and was the easiest way I could find to > handle _zmodload seeing as it has all the flags first. Yes, that's ok. Of course, one could use multiple loops when _zmodload is changed to complete the things needed by zmodload. E.g. completion after `zmodload -ac foo ' completes builtins, which is wrong. The same for -ap etc. Another questionable completion is `zmodload -A '. That completes modules files, but we need an alias name (something we can't really complete at that point, because the user almost certainly wants a new alias name). And those builtins completed... offering the builtins currently defined is a simple solution for a hard problem, but will be wrong in most cases. For the modules we have currently, the builtins could be derived with something like `nm | grep bin_'. Unfortunately, this isn't guaranteed to be correct and won't work for autoloaded parameters, conditions and so on anyway. Maybe trying to find a .mdd file and looking at it would be a better solution. Or maybe giving up and doing what _zmodload does now... sigh. The patch makes the return value built be used. Bye Sven Index: Completion/Builtins/_zmodload =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_zmodload,v retrieving revision 1.6 diff -u -r1.6 _zmodload --- Completion/Builtins/_zmodload 2000/08/18 17:21:58 1.6 +++ Completion/Builtins/_zmodload 2000/08/21 07:59:44 @@ -44,3 +44,5 @@ _requested aliases expl 'module alias' \ compadd "$suf[@]" -k 'modules[(R)alias*]' && ret=0 done + +return ret -- Sven Wischnowsky wischnow@informatik.hu-berlin.de