From: Silvio Rhatto Date: Wed, 26 Jul 2023 13:33:25 +0000 (-0300) Subject: Fix: collector: match tasks and regular items X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=ae3d8473f8dec95c159a66170630bdac38e7ae3d;p=scripts.git Fix: collector: match tasks and regular items --- diff --git a/collector b/collector index f8545f9..aba470e 100755 --- 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