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

Re: [patch] _aptitude



> I started using aptitude recently and noticed that the completion for
> some commands were not behaving as expected, so I made some trivial
> changes to the _aptitude file.

Thanks.  Your changes have been incorporated for the next release.

> Note that (un)markauto are meant to be used on *installed* packages,
> and so I moved them into the appropriated group. Ideally they should
> complete on "unmarked/marked" packages, the list of marked packages is
> available through
> 
> aptitude -F"%p"  search \~M

> but (i) that's a bit slow and (ii) I couldn't figure a way to include
> this in the completion function (in the 5min I spent trying that is...)

Since that takes so long, you should probably make use of the caching
layer; search for _cache in the zshcompsys man page or look at
_deb_packages.

To include it without any caching, you can replace your invocation of
_deb_packages with something like this:

   _wanted package expl 'package' compadd $(aptitude -F"%p" search \~M)

> I reckon that some options I just turned ON allow things like
> packagename=version and that is not being done, yet "aptitude install"
> also allows for things like "~nzsh" and that's not implemented either;
> so I concluded that it was OK to do it so.

packagename=version and packagename/suite would be nice additions as
well.



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