From: Ian Kelling <ian@iankelling.org>
Date: Fri, 16 May 2014 00:53:03 +0000 (-0700)
Subject: better aptitude search
X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=597e3e0b082afaeff5b68cd767008fa32984d6ad;p=distro-setup

better aptitude search
---

diff --git a/.bashrc b/.bashrc
index 76cf30b..c88a065 100644
--- a/.bashrc
+++ b/.bashrc
@@ -504,10 +504,16 @@ else
         fi
     }
     pf() {
+        # scratch a very annoying itch.
+        # package description width as wide as the screen, and package name field small
+        # aptitude manual can't figure out how wide emacs terminal is,
+        # of course it doesn't consult the $COLUMNS variable...
+        # and in a normal terminal, it makes the package name field ridiculously big
+        # also, remove that useless dash before the description
         if [[ $EUID == 0 ]]; then
-            aptitude search "$@"
+            aptitude -F "%c%a%M %p %$((COLUMNS - 30))d" -w $COLUMNS search "$@"
         else
-            sudo aptitude search "$@"
+            sudo aptitude -F "%c%a%M %p %$((COLUMNS - 30))d" -w $COLUMNS search "$@"
         fi
     }
 fi