Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: _auto-apt

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 <tab>
> i have the completion for main,contrib,non-free,etc..., but :
> auto-apt -a main,<tab> 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.


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.

Messages sorted by: Reverse Date, Date, Thread, Author