From 18fcaf66d76c6554c007cadef655128ac99dc14f Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Mon, 10 Apr 2023 20:44:25 +0800 Subject: Update --- bin/task/context | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bin/task') diff --git a/bin/task/context b/bin/task/context index 6e48df3..44193d0 100755 --- a/bin/task/context +++ b/bin/task/context @@ -8,7 +8,7 @@ LOG_FILE=~/log/.context && touch $LOG_FILE PLAN_FILE=~/log/plan.context.md context="$(cat ~/.task/context)" -[[ "$@" =~ '-s' ]] && SET=true && shift +[[ "$*" =~ '-s' ]] && SET=true && shift time="$1" # The unit of time display. For example: @@ -76,6 +76,8 @@ _print_spend_time() { # Print context and time I spend echo -ne "$ctx\t\t" date -u -d @"$sec" +%H:%M | tr -d '\n' + echo -n "/" + date -u -d @"$seconds_of_plan" +%H:%M | tr -d '\n' number_of_spend=$(( $sec / $UNIT )) # Print block of time spend (green) -- cgit v1.2.3-70-g09d2