]> gitweb.fluxo.info Git - scripts.git/commitdiff
Fix: collector: match tasks and regular items
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 26 Jul 2023 13:33:25 +0000 (10:33 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 26 Jul 2023 13:33:25 +0000 (10:33 -0300)
collector

index f8545f9e4f461de300ab2fc07ca2c0a7b559b0ac..aba470e1cd8f8ec153d23c4f890c4ab1ebf17f0f 100755 (executable)
--- a/collector
+++ b/collector
@@ -24,12 +24,12 @@ if [ -z "$ACTION" ] || [ "$ACTION" == "view" ]; then
   cat "$COLLECTOR_FILE"
 elif [ "$ACTION" == "add" ]; then
   shift
-  echo "* [ ] $*" >> "$COLLECTOR_FILE"
+  echo "* $*" >> "$COLLECTOR_FILE"
 elif [ "$ACTION" == "list" ]; then
-  if grep -q -e "^\* \[ \]" "$COLLECTOR_FILE"; then
+  if grep -q -e "^ *\* " "$COLLECTOR_FILE"; then
     echo "Collected items at $COLLECTOR_FILE:"
     echo ""
-    grep -e "^\* \[ \]" "$COLLECTOR_FILE"
+    grep -e "^ *\* " "$COLLECTOR_FILE"
     echo ""
   fi
 elif [ "$ACTION" == "edit" ]; then