From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13433 invoked from network); 21 May 2002 16:04:08 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 21 May 2002 16:04:08 -0000 Received: (qmail 12652 invoked by alias); 21 May 2002 16:04:02 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17207 Received: (qmail 12638 invoked from network); 21 May 2002 16:04:01 -0000 X-VirusChecked: Checked Date: Tue, 21 May 2002 17:03:31 +0100 From: Oliver Kiddle To: Bruno Bonfils Cc: zsh-workers@sunsite.dk Subject: Re: _auto-apt Message-ID: <20020521160331.GA26295@logica.com> References: <878z6d1pmo.fsf@jazzland.hash-group.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <878z6d1pmo.fsf@jazzland.hash-group.net> User-Agent: Mutt/1.3.28i Sender: Oliver Kiddle On Tue, May 21, 2002 at 05:34:23PM +0200, Bruno Bonfils wrote: > i attach the _auto-apt completion function that just i finish to > write. But i still have one problem : > > _wanted distribution expl 'distribution' compadd -q -S, $distribs > > as you can see, user can use one or many distrubitions, comma > separated, thats why i add the -S, So, when i a do > > auto-apt -a > > i have the completion for main,contrib,non-free,etc..., but : > > auto-apt -a main, do nothing That is because it doesn't know that it should ignore the `main,' for the purposes of matching. By doing: compset -P '*,' you could make it chop off everything up to the last comma. You would also probably want compset -S ',*' so that it works with tab pressed in the middle of a list. However, in this instance, it would be much easier to just use _values -s , 'distribution' $distribs as _values does all that work for you. Oliver This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.