aboutsummaryrefslogtreecommitdiff
path: root/collector
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2023-07-19 16:56:07 -0300
committerSilvio Rhatto <rhatto@riseup.net>2023-07-19 16:56:07 -0300
commit10f57f9fe0e85c3d2361f1d17e8c91a202fcbb0d (patch)
tree6a5cb11f937cf0c317f438c25e85a6758dbf8d9e /collector
parentf2fc6d57656a8e7238efecd4afd0cc8c8c325e84 (diff)
downloadscripts-10f57f9fe0e85c3d2361f1d17e8c91a202fcbb0d.tar.gz
scripts-10f57f9fe0e85c3d2361f1d17e8c91a202fcbb0d.tar.bz2
Feat: status: list collected items
Diffstat (limited to 'collector')
-rwxr-xr-xcollector6
1 files changed, 5 insertions, 1 deletions
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"