From 9ca8d933c69e5a52e7866227dfc823657c180f40 Mon Sep 17 00:00:00 2001 From: Igor Murzov Date: Tue, 23 Jul 2013 02:37:20 +0400 Subject: [PATCH] dpkg: Suppress unwanted error messages (Debian: #706502) --- completions/dpkg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/completions/dpkg b/completions/dpkg index d14e5e3e..7ecad5f9 100644 --- a/completions/dpkg +++ b/completions/dpkg @@ -8,11 +8,11 @@ _comp_dpkg_installed_packages() } || { _comp_dpkg_installed_packages() { - command grep -A 1 "Package: $1" /var/lib/dpkg/status | \ + command grep -A 1 "Package: $1" /var/lib/dpkg/status 2>/dev/null | \ command grep -B 1 -Ee "ok installed|half-installed|unpacked| \ half-configured" \ -Ee "^Essential: yes" | \ - command grep "Package: $1" | cut -d\ -f2 + command grep "Package: $1" 2>/dev/null | cut -d\ -f2 } } @@ -24,11 +24,11 @@ _comp_dpkg_purgeable_packages() } || { _comp_dpkg_purgeable_packages() { - command grep -A 1 "Package: $1" /var/lib/dpkg/status | \ + command grep -A 1 "Package: $1" /var/lib/dpkg/status 2>/dev/null | \ command grep -B 1 -Ee "ok installed|half-installed|unpacked| \ half-configured|config-files" \ -Ee "^Essential: yes" | \ - command grep "Package: $1" | cut -d\ -f2 + command grep "Package: $1" 2>/dev/null | cut -d\ -f2 } }