]> git.plutz.net Git - confetti/blobdiff - pages/cards.sh
cleanup of category handling
[confetti] / pages / cards.sh
index 506022ff727bcd9ba0507f9945806c093394456a..a90981c6a16d02ec265bc80653aed9b29b90eca4 100755 (executable)
@@ -60,7 +60,8 @@ list_hi_companies(){
 
 list_categories() {
   catfile="${_DATA}/mappings/categories"
-  sort -u "$catfile"
+  sort -u "$catfile" \
+  | sed -r '/^[\t ]*$/d'
 }
 
 listcards() {
@@ -76,7 +77,7 @@ listcards() {
            *:*) expr="${each%%:*}"'(\;[^\n]+)*:[^\n]*'"(${each#*:})";;
              *) expr="(${each})";;
     esac
-    filterex='/(^|\n)'"${expr}"'/{'"${filterex}"'}'
+    filterex='/(^|\n)'"${expr}"'/I{'"${filterex}"'}'
   done
 
   for file in "${_DATA}/vcard/"*.vcf; do