diff --git a/pkgquery b/pkgquery index 2230b56..3c1b3ac 100755 --- a/pkgquery +++ b/pkgquery @@ -145,7 +145,7 @@ pkg_search() { needarg $@ arg=$* for repo in $REPO; do - out=$(grep -R "# description" $repo | grep $BUILD_SCRIPT | grep "$arg" | awk -F : '{print $1}') + out=$(grep -R "# description" $repo | grep $BUILD_SCRIPT | grep "$arg" | awk -F : '{print $1}' | sort) [ "$out" ] || continue for line in $out; do repo=$(echo $line | rev | awk -F / '{print $3}' | rev) diff --git a/scratch b/scratch index ca2f365..72ac0f7 100755 --- a/scratch +++ b/scratch @@ -902,7 +902,7 @@ scratch_search() { needarg $@ arg=$* for repo in $PORT_REPO; do - out=$(grep -R "# description" $repo | grep $BUILD_SCRIPT | grep "$arg" | awk -F : '{print $1}') + out=$(grep -R "# description" $repo | grep $BUILD_SCRIPT | grep "$arg" | awk -F : '{print $1}' | sort) [ "$out" ] || continue found=1 for line in $out; do