From 10f57f9fe0e85c3d2361f1d17e8c91a202fcbb0d Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 19 Jul 2023 16:56:07 -0300 Subject: Feat: status: list collected items --- collector | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'collector') diff --git a/collector b/collector index 0e5b50c..fcbb3b7 100755 --- a/collector +++ b/collector @@ -26,7 +26,11 @@ elif [ "$ACTION" == "add" ]; then shift echo "* [ ] $*" >> "$COLLECTOR_FILE" elif [ "$ACTION" == "list" ]; then - grep -e "^\* \[ \]" "$COLLECTOR_FILE" + if grep -q -e "^\* \[ \]" "$COLLECTOR_FILE"; then + echo "Collected items at $COLLECTOR_FILE:" + echo "" + grep -e "^\* \[ \]" "$COLLECTOR_FILE" + fi elif [ "$ACTION" == "edit" ]; then if [ ! -z "$EDITOR" ]; then $EDITOR "$COLLECTOR_FILE" -- cgit v1.2.3