On Tue, Apr 08, 2008 at 11:24:02AM +0200, Flavio Visentin wrote:
> Package: bash-completion
> Version: 20060301-4
> Severity: normal
> Tags: patch
> 
> 
> apt-get autoremove must complete exactly like apt-get remove, comleting with 
> the list of installed packages 
> 
> --- /etc/bash_completion.old    2008-04-08 11:16:22.000000000 +0200
> +++ /etc/bash_completion        2008-04-08 11:16:26.000000000 +0200
> @@ -2066,14 +2066,14 @@
>       prev=${COMP_WORDS[COMP_CWORD-1]}
>  
>       for (( i=0; i < [EMAIL PROTECTED]; i++ )); do
> -             if [[ ${COMP_WORDS[i]} == 
> @(install|remove|purge|source|build-dep) ]]; then
> +             if [[ ${COMP_WORDS[i]} == 
> @(install|remove|autoremove|purge|source|build-dep) ]]; then
>                       special=${COMP_WORDS[i]}
>               fi
>       done
>  
>       if [ -n "$special" ]; then
>               case $special in
> -             remove|purge)
> +             remove|autoremove|purge)
>                       if [ -f /etc/debian_version ]; then
>                               # Debian system
>                               COMPREPLY=( $( _comp_dpkg_installed_packages \

You forgot about completing "autoremove" itself (see attached patch).

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)
--- /etc/bash_completion~	2007-02-10 19:19:38.000000000 +0100
+++ /etc/bash_completion	2008-04-17 15:26:29.000000000 +0200
@@ -2084,7 +2084,7 @@
 	else
 
 		COMPREPLY=( $( compgen -W 'update upgrade dselect-upgrade \
-				dist-upgrade install remove source build-dep \
+				dist-upgrade install remove autoremove source build-dep \
 				check clean autoclean' -- $cur ) )
 
 	fi

Reply via email to