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

Re: PATCH: _apt-get and _deb_packages



Tanaka Akira <akr@xxxxxxxxxxx> writes:

> This is completion functions for apt-get of Debian.

Thanks, this is a good idea.

It would be nice if after 'install' only uninstalled packages would be
completed, and after 'remove' and 'purge' only installed.

A way to get installed packages is

dpkg --get-selections | awk '/[^e]install$/ { print $1 }'

Another problem is that when using the "apt" tool, dpkg might not know 
about some available packages. Perhaps a better way of getting
available packages is

apt-cache dumpavail |  awk '/^Package:/ { print $2 }'

Perhaps there is an easy way of making a set difference to get a list
of uninstalled packages.

Unfortunately, I haven't yet looked enough at the new completion
system to help you further...

	Falk



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