From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23434 invoked from network); 30 Mar 2001 08:21:17 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 30 Mar 2001 08:21:17 -0000 Received: (qmail 13878 invoked by alias); 30 Mar 2001 08:21:09 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13848 Received: (qmail 13866 invoked from network); 30 Mar 2001 08:21:09 -0000 Date: Fri, 30 Mar 2001 10:21:08 +0200 (MET DST) Message-Id: <200103300821.KAA22411@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.dk In-reply-to: "Bart Schaefer"'s message of Thu, 29 Mar 2001 16:24:03 +0000 Subject: Re: Two missing completion functions that bug me Bart Schaefer wrote: > On Mar 29, 11:09am, Oliver Kiddle wrote: > } > } > '-c+[create parameter or change type]' \ > } > } I'm not sure you need the + after -c, or at least that is the only > } difference to my function (other than wording for the help info). > > You're right; upon another attempt, none of -c, -e, nor -h need the `+'. > I was thinking it was needed to get other options to be completed in the > same word, because of: > > % vared -a > % vared -a > ^cursor silently moves here > > but in fact that's because -a takes an argument, not (only) because it > does not have the `+'. (Is there a way *other than* adding a ->state > machine to get other options to complete in the same word but arguments > in the next for an option like -a? I was thinking not, and in fact I > was thinking that I was one who asserted that ->state was a sufficient > solution for this, a position I'm not inclined to change.) You could try the patch below, which does that (automatically) for me. I'll commit it if we don't find any nasty side effect (or should I apply it and take it back if we find problems? feel free to commit it if you like it...) > ... [ comp* funcs ] > > I suppose one could provide completions for them anyway, in case one is > editing a new completion function on the fly, but it seems a lot of work > for not a lot of benefit. Yes, I thought the same. > These don't need completions because they're keywords: > > break continue > > Which leaves: > > : echo pushln suspend umask > [ exit pwd test zformat > bye getln r ttyctl zparseopts > dirs logout return ulimit zprof zparseopts and zformat aren't of much use interactively either. And completion for bye, exit and return seems weird, too. Although that would probably just be `_message "${${words[1]#bye}:-exit} value"'. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de