From 478f62fcb805c61ad08dff1b905bf824546a69f2 Mon Sep 17 00:00:00 2001 From: paul Date: Tue, 15 Mar 2016 10:57:20 +0000 Subject: [PATCH] put negations at end in title listing svn path=/trunk/; revision=111 --- pages/list.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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" -- 2.39.2