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 } }