From b4c92cdce88e39f4cac99f29fd8af2bfa6afe5ca Mon Sep 17 00:00:00 2001 From: "chess.griffin" Date: Tue, 12 Aug 2008 01:29:05 +0000 Subject: [PATCH] merge new patch from Erik Hanson that grealy improves how the search results are displayed in the dialog interface; this also changes how the browse results are displayed as well --- src/usr/bin/sbopkg | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/usr/bin/sbopkg b/src/usr/bin/sbopkg index c84c7f0..4537230 100755 --- a/src/usr/bin/sbopkg +++ b/src/usr/bin/sbopkg @@ -325,8 +325,8 @@ rm -f $TMP/sbopkg_category_items_list 2> /dev/null DIR=( */ ) if [ -n "$DIR" ]; then for i in ${DIR[*]%/}; do - DESC=$(grep -h -Z -m1 ^$i ./$i/slack-desc* | sed -e s/$i': '//) - echo "$i \"$DESC\"" >> $TMP/sbopkg_category_items_list + DESC=$(grep -hZm1 ^$i ./$i/slack-desc* | cut -d\( -f2- | cut -d\) -f1) + echo "\"$i\" \"$DESC\"" >> $TMP/sbopkg_category_items_list done fi cd $LOCALREPO/$SLACKVER @@ -584,10 +584,11 @@ RESULTS=$(find . -mindepth 2 -type d | grep $PKG | sed -e 's/.\///') if [ -n "$RESULTS" ]; then if [ "$DIAG" = 1 ]; then for i in $RESULTS; do - echo "\"$i\"" "__" >> $TMP/sbopkg_search_results + DESC=$(grep -hZm1 ^$(echo "$i" | cut -d/ -f2) ./$i/slack-desc* | cut -d\( -f2- | cut -d\) -f1) + echo "\"$i\" \"$DESC\"" >> $TMP/sbopkg_search_results done dialog --title "Matches for $PKG" --menu "Please select an \ - item you wish to view." 20 70 14 --file \ +item you wish to view." 20 70 14 --file \ $TMP/sbopkg_search_results 2>$TMP/sbopkg_search_choice if [ ! $? = 1 ]; then SRCHPICK="$(cat $TMP/sbopkg_search_choice)"