From 597e3e0b082afaeff5b68cd767008fa32984d6ad Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Thu, 15 May 2014 17:53:03 -0700 Subject: [PATCH] better aptitude search --- .bashrc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 -- 2.30.2