]> git.plutz.net Git - serve0/blobdiff - pages/list.sh
put negations at end in title listing
[serve0] / pages / list.sh
index 39a6ccbea7e64855400e61ca81833aedfd8fa3f2..eddbb8c63c87cea04ba220dd5a32d8c9e1e7bfe2 100755 (executable)
@@ -24,7 +24,12 @@ LF='
 filters="${_GET[f]}"
 debug "FILTERS: $filters"
 
-present_filter(){ printf %s "$*" |sed -r 's;(^|!|\^|\|)([^!\^\|:]+:);\1;g;s;\^; \&amp\; ;g' }
+present_filter(){
+  printf %s\\n "$*" \
+  | sed -r 's;(^|!|\^|\|)([^!\^\|:]+:);\1;g;s;\^;\n;g' \
+  | sort -r \
+  | sed -r '$q;s;$; \&amp\; ;g'
+}
 
 if [ -n "$search" ]; then
   TITLE="$search by $order"