From: paul Date: Tue, 15 Mar 2016 10:57:20 +0000 (+0000) Subject: put negations at end in title listing X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=478f62fcb805c61ad08dff1b905bf824546a69f2;p=serve0 put negations at end in title listing svn path=/trunk/; revision=111 --- diff --git a/pages/list.sh b/pages/list.sh index 39a6ccb..eddbb8c 100755 --- a/pages/list.sh +++ b/pages/list.sh @@ -24,7 +24,12 @@ LF=' filters="${_GET[f]}" debug "FILTERS: $filters" -present_filter(){ printf %s "$*" |sed -r 's;(^|!|\^|\|)([^!\^\|:]+:);\1;g;s;\^; \&\; ;g' } +present_filter(){ + printf %s\\n "$*" \ + | sed -r 's;(^|!|\^|\|)([^!\^\|:]+:);\1;g;s;\^;\n;g' \ + | sort -r \ + | sed -r '$q;s;$; \&\; ;g' +} if [ -n "$search" ]; then TITLE="$search by $order"