]> gitweb.fluxo.info Git - scripts.git/commitdiff
Feat: status: list collected items
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 19 Jul 2023 19:56:07 +0000 (16:56 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 19 Jul 2023 19:56:07 +0000 (16:56 -0300)
collector
status

index 0e5b50c9f712b500563fee54f37e8742908d8ff5..fcbb3b71379607d4546eac05911c4a74faa61e4e 100755 (executable)
--- 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"
diff --git a/status b/status
index 88df77a70857b3ca1b98b0a026bf14c3af622cc2..c26bc6cdbd7822d6d39bb70542616ec44e43fb44 100755 (executable)
--- a/status
+++ b/status
@@ -93,6 +93,9 @@ function status_run {
     # Check your TODO lists, filtering only important tasks
     todo list important
 
+    # Collected items that need to be moved somewhere else
+    collector list
+
     # Check if you have mails to send
     postponed