X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=.bashrc;h=c88a065bfed4fbcf0238a9dc16cbcb9a6fbc04e3;hb=597e3e0b082afaeff5b68cd767008fa32984d6ad;hp=76cf30b21570be7a473800900bf0304f05900e8a;hpb=b304880b97007d96ba9ff8775e3585398041ea7d;p=distro-setup 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