aboutsummaryrefslogtreecommitdiffhomepage
path: root/share
diff options
context:
space:
mode:
authorGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2013-09-17 22:27:15 +0800
committerGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2013-09-17 22:27:15 +0800
commit7935b1613a105303288d037811c2bea5a5468822 (patch)
treefebaaf986059c863ebbb74e2e5e16fbb4e7581bc /share
parent8df81f93c8556356ebae7139de4edca322e53ac5 (diff)
__fish_print_packages: ignore errors, do less manipulation
Closes #479 by piping STDERR to /dev/null. Also does much less manipulation of the package list; there are no packages in any of the archives containing the names that are stripped out as far as I can see.
Diffstat (limited to 'share')
-rw-r--r--share/functions/__fish_print_packages.fish9
1 files changed, 3 insertions, 6 deletions
diff --git a/share/functions/__fish_print_packages.fish b/share/functions/__fish_print_packages.fish
index 96d1a6ed..decf410d 100644
--- a/share/functions/__fish_print_packages.fish
+++ b/share/functions/__fish_print_packages.fish
@@ -13,12 +13,9 @@ function __fish_print_packages
set -l package (_ Package)
if type -f apt-cache >/dev/null
- # Apply the following filters to output of apt-cache:
- # 1) Remove package names with parentesis in them, since these seem to not correspond to actual packages as reported by rpm
- # 2) Remove package names that are .so files, since these seem to not correspond to actual packages as reported by rpm
- # 3) Remove path information such as /usr/bin/, as rpm packages do not have paths
-
- apt-cache --no-generate pkgnames (commandline -tc)|sgrep -v \( |sgrep -v '\.so\(\.[0-9]\)*$'|sed -e 's/\/.*\///'|sed -e 's/$/'\t$package'/'
+ # Do not generate the cache as apparently sometimes this is slow.
+ # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=547550
+ apt-cache --no-generate pkgnames (commandline -tc) ^/dev/null | sed -e 's/$/'\t$package'/'
return
end