From ea29d6f7ac6ab912694ca12e3d2c2cdfcc2a716e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Sat, 1 Feb 2025 10:36:10 +0100 Subject: [PATCH] Update t script to add a small warning --- symlinks/bin/t | 3 +++ 1 file changed, 3 insertions(+) diff --git a/symlinks/bin/t b/symlinks/bin/t index 70111c6..af94337 100755 --- a/symlinks/bin/t +++ b/symlinks/bin/t @@ -125,6 +125,9 @@ if [ -z "$TIMESHEET_LEDGER_HOME" ]; then fi time_in () { + if echo "$PROJECT" | grep -q ".*:Client:.*:"; then + echo "WARNING: Using sub-projects per client is deprecated. Consider using just Client instead of sub-projects for easier management" + fi LAST_ENTRY=$(grep "$PROJECT" "$TIMESHEET_LEDGER_HOME/timesheets/$(date +%Y).journal" | tail -1 | cut -f1 -d ' ') if [ "$LAST_ENTRY" = "i" ]; then echo "Timer for project $PROJECT was already started. Aborting..."