]> git.plutz.net Git - serve0/blobdiff - list.sh
prefer shell based unstring function
[serve0] / list.sh
diff --git a/list.sh b/list.sh
index 259b9cdf3bfb6dba4b0cf2d583d5979f5477a04c..1ae43f19e58c1911dcf2bbfba0fd4ed8bfbc1f52 100644 (file)
--- a/list.sh
+++ b/list.sh
@@ -35,12 +35,12 @@ list_item() {
       "$link" "$link" "${name##/}" \
       "$((length / 60))" "$((length % 60))" \
       "$width" "$height" \
-      "$(printf '%s\n' "${tags#tags=}" \
-         | sed -r "$UNSTRING"' s;^;,;; s;,+;,;g; s;,$;;;
+      "$(UNSTRING "${tags#tags=}" \
+         | sed -r 's;^;,;; s;,+;,;g; s;,$;;;
                    :X s;,-?([^,]+)(,|$); [span .tag\n \1]\2;; tX;'
       )" "$name" "$link" "$link"
   else
-    printf 'Canning record for nonexist file: %s\n' "$name" >&2
+    debug "Canning record for nonexist file: $name"
     meta_purge "$_DATA/$ITEM/$name"
   fi
 }
@@ -71,7 +71,7 @@ list_fullname(){
 
 list_filter(){
   if [ "$FILTER" ]; then
-    printf "FEX: %s\n" "$list_fex" >&2
+    debug "FEX:" "$list_fex"
     sed -nE "$list_fex"
   elif [ "${SEARCH#!}" != "${SEARCH}" ]; then
     grep -aviEe "$(STRING "${SEARCH}" \