From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4498 invoked from network); 29 Mar 2001 16:24:59 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Mar 2001 16:24:59 -0000 Received: (qmail 13148 invoked by alias); 29 Mar 2001 16:24:50 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13842 Received: (qmail 13117 invoked from network); 29 Mar 2001 16:24:47 -0000 From: "Bart Schaefer" Message-Id: <1010329162403.ZM19148@candle.brasslantern.com> Date: Thu, 29 Mar 2001 16:24:03 +0000 In-Reply-To: <20010329100902.61890.qmail@web9305.mail.yahoo.com> Comments: In reply to Oliver Kiddle "Re: Two missing completion functions that bug me" (Mar 29, 11:09am) References: <20010329100902.61890.qmail@web9305.mail.yahoo.com> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Re: Two missing completion functions that bug me MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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.) } Would it be worth it to try to have completions for all builtins ready } for 4.0? Possibly. } I've put a (quickly generated so not ideal) list of all those } which don't have a completion I get the same list as you, by comparing ${(k)_comps} to ${(k)builtins}. Arguably these don't need completions because they can't be used in an interactive way: compadd compdescribe compgroups compset comptry comparguments compfiles compquote comptags compvalues Similarly zregexparse, which although it could be used interactively, doesn't make much sense outside _regex_arguments and is not really even documented. 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. 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 } Any ideas what should be done for commands with just one option } (like suspend) - completing -f might not be what people expect. Behave as if prefix-needed is true. Complete nothing unless the `-' is already there. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net