From 20c3bc4eb1dc968cf40a35c4f4cd00a225c072f3 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Fri, 17 Dec 2010 16:22:33 +0100 Subject: interactive_select_packages(): show package description when hoovering over package --- src/core/libs/lib-pacman.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/core/libs/lib-pacman.sh') diff --git a/src/core/libs/lib-pacman.sh b/src/core/libs/lib-pacman.sh index 474f551..f087c83 100644 --- a/src/core/libs/lib-pacman.sh +++ b/src/core/libs/lib-pacman.sh @@ -144,5 +144,16 @@ list_packages () # order is the same as the input which_group () { - PACKAGE_GROUPS=`LANG=C $PACMAN_TARGET -Si $1| awk '/^Name/{ printf("%s ",$3) } /^Group/{ print $3 }'` + PACKAGE_GROUPS=`LANG=C $PACMAN_TARGET -Si $1 | awk '/^Name/{ printf("%s ",$3) } /^Group/{ print $3 }'` +} + +# get group and packagedesc for packages +# $1 packages separated by spaces +# output format: multiple lines, each line like: +# +# order is the same as the input +# note that space is used as separator, but desc is the only thing that will contain spaces. +pkginfo () +{ + PACKAGE_INFO=`LANG=C $PACMAN_TARGET -Si $1 | awk '/^Name/{ printf("%s ",$3) } /^Group/{ printf("%s", $3) } /^Description/{ for(i=3;i<=NF;++i) printf(" %s",$i); printf ("\n")}'` } -- cgit v1.2.3-54-g00ecf