From: Dr.Rafael Sepúlveda <drs@gnulinux.org.mx>

- fix bug present in both _comp-dpkg-installed-packages() and
  _comp-dpkg-hold-packages() that results in all packages being returned.
This commit is contained in:
ianmacd 2002-05-30 18:17:29 +00:00
parent eb5b564fcb
commit 2f36889d9b

View File

@ -1,6 +1,6 @@
# bash_completion - some programmable completion functions for bash 2.05a # bash_completion - some programmable completion functions for bash 2.05a
# #
# $Id: bash_completion,v 1.336 2002/05/30 19:08:15 ianmacd Exp $ # $Id: bash_completion,v 1.337 2002/05/30 20:17:29 ianmacd Exp $
# #
# Copyright (C) Ian Macdonald <ian@caliban.org> # Copyright (C) Ian Macdonald <ian@caliban.org>
# #
@ -1427,7 +1427,7 @@ complete -F _apt_cache $filenames apt-cache
have aptitude && { have aptitude && {
_comp-dpkg-hold-packages() _comp-dpkg-hold-packages()
{ {
grep -B 2 'hold' /var/lib/dpkg/status | grep 'Package' \ grep -B 2 'hold' /var/lib/dpkg/status | grep "Package: $1" \
| cut -d\ -f2 | cut -d\ -f2
} }
@ -2569,7 +2569,7 @@ _cardctl()
have dpkg && { have dpkg && {
_comp-dpkg-installed-packages() _comp-dpkg-installed-packages()
{ {
grep -B 2 'ok installed' /var/lib/dpkg/status | grep 'Package' | \ grep -B 2 'ok installed' /var/lib/dpkg/status | grep "Package: $1" | \
cut -d\ -f2 cut -d\ -f2
} }