aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-07-27 16:33:55 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-07-27 16:33:55 -0300
commit9e2ce95bc99977bf47c9cfbe3489440cdd3418d7 (patch)
tree66cf8fa72d4dcbad78a6b557ebb98196ccc5a746
parentd37ff984209438d7e88361cf33bb2369abaee7b4 (diff)
downloadscripts-9e2ce95bc99977bf47c9cfbe3489440cdd3418d7.tar.gz
scripts-9e2ce95bc99977bf47c9cfbe3489440cdd3418d7.tar.bz2
Fix: collector: use '~' instead of full home folder pathname
-rwxr-xr-xcollector4
1 files changed, 3 insertions, 1 deletions
diff --git a/collector b/collector
index 5967e52..570d13c 100755
--- a/collector
+++ b/collector
@@ -30,7 +30,9 @@ elif [ "$ACTION" == "add" ]; then
echo "* $*" >> "$COLLECTOR_FILE"
elif [ "$ACTION" == "list" ]; then
if grep -q -e "^ *\* " "$COLLECTOR_FILE"; then
- echo "Collected items at $COLLECTOR_FILE:"
+ COLLECTOR_NAME="`echo $COLLECTOR_FILE | sed -e "s|$HOME|~|"`"
+
+ echo "Collected items at $COLLECTOR_NAME:"
echo ""
grep -e "^ *\* " "$COLLECTOR_FILE"
echo ""