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

Re: Bug#262157: zsh: Missed completion for apt-get install -t unstable



Clint wrote:
> >   apt-get install -t unstable pbb[TAB]
> > 
> > and zsh completed it to pbbuttonsd-dev, though I wanted to install
> > the unstable version of pbbuttonsd.
> 
> I see three options:
> 
> a) status quo
> b) complete pbuttonsd even if it's already installed and pbuttonsd-dev
>    matches

It should do that anyway! apt-get install can be used to upgrade a single
package that is already installed. If we don't take account of things
like -t unstable then this option is definitely the way to go.

> c) add intelligence to figure out whether or not one is trying to
>    install a different version of an installed package (or the same
>    version if --reinstall is given)

Good luck making sense of _regex_arguments.

We really ought to rewrite apt-get completion without using
_regex_arguments. _regex_arguments is a nice idea and if it didn't rely
on nasty things like all the nulls, it could be quite good. Would be
nice if apt completion took account of things like --reinstall and used
separate tags for already installed packages and uninstalled ones etc.

It is also the case that stuff like:
_deb_packages_cache_uninstalled=( $(print -l $_deb_packages_cache_avail $_deb_packages_cache_installed|sort|uniq -u) )
is actually faster than the zsh stuff it currently does. We ought to be
careful about blindly assuming the native zsh stuff is quicker.

I've sort of meant to do something about deb completion but I've not
had the time. I also started using aptitude's command-line interface
instead so care less about apt-get. (aptitude seems to be able to
keep track of stuff that was only installed to fulfill a dependency).

Oliver



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