I'm not sure if I would want apt-get install autocompletion to skip installed packages.. after all..
"sudo apt-get install yakuake --reinstall"
is a valid command.
The issue with autocompletion of not installable packages might be because "apt-cache pkgnames", which is the where the package names come from, lists not only installable packages but also package names that it finds in the depends- and suggests-fields. It is possible to get rid of some of these not installable packages by changing the file
/etc/bash_completion, line 2135 from
COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) )
to
COMPREPLY=( $( apt-cache pkgnames -o Apt::Cache::Allnames=false $cur 2> /dev/null ) )
I'm not sure if this change comes with any bad side effects.. I'm using it on my system right now and I haven't noticed anything bad so far.
(Line numbers and such is taken from my machine running ubuntu 9.04 64bit)
I'm not sure if I would want apt-get install autocompletion to skip installed packages.. after all..
"sudo apt-get install yakuake --reinstall"
is a valid command.
The issue with autocompletion of not installable packages might be because "apt-cache pkgnames", which is the where the package names come from, lists not only installable packages but also package names that it finds in the depends- and suggests-fields. It is possible to get rid of some of these not installable packages by changing the file completion, line 2135 from :Allnames= false $cur 2> /dev/null ) )
/etc/bash_
COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) )
to
COMPREPLY=( $( apt-cache pkgnames -o Apt::Cache:
I'm not sure if this change comes with any bad side effects.. I'm using it on my system right now and I haven't noticed anything bad so far.
(Line numbers and such is taken from my machine running ubuntu 9.04 64bit)