]> git.plutz.net Git - serve0/blobdiff - widgets.sh
Merge branch 'cgilite' of git.plutz.net:serve0 into cgilite
[serve0] / widgets.sh
index ba47062a9f775b9020b1cacebdd8a412edf1e0a8..4a64deb08df1957c4ff03eac7e2c1c1ad8f4d261 100644 (file)
@@ -128,7 +128,7 @@ w_advsearch(){
               $n "$category" "$t" "$lbid" "$lbid" "$category" $n
 
       printf '%s\n' "$w_tags" \
-      | { [ "$category" = '*' ] && grep -vF ':' |grep -vxF '' || grep -wF "${category}"; } \
+      | { [ "$category" = '*' ] && grep -avF ':' |grep -avxF '' || grep -awF "${category}"; } \
       | while read -r tag; do
         t=''; [ ! "${f%%*|${tag}|*}" ] && t=checked
         printf '[option %s value="%s"\n%s]' "$t" "$tag" "${tag#*:}"
@@ -159,7 +159,7 @@ w_tagging(){
   | while read -r category; do
     printf '[fieldset [legend %s:][select name=tag size=4 multiple' "$category"
     printf %s "$w_tags" \
-    | { [ "$category" = 'Tags' ] && grep -vF ':' | grep -vxF '' || grep -wF "${category}"; } \
+    | { [ "$category" = 'Tags' ] && grep -avF ':' | grep -avxF '' || grep -awF "${category}"; } \
     | while read -r tag; do
       printf '[option value="%s"\n%s]' "$tag" "${tag#*:}"
     done