aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2023-04-10 20:44:25 +0800
committerHsieh Chin Fan <pham@topo.tw>2023-04-10 20:44:25 +0800
commit18fcaf66d76c6554c007cadef655128ac99dc14f (patch)
tree7c45df780a8e70d2fccfa6ecb8907b544cbe63a7 /bin
parentab8aac861dc37ee8f8aa1e719c0e6e3ccff90d01 (diff)
Update
Diffstat (limited to 'bin')
-rwxr-xr-xbin/task/context4
1 files changed, 3 insertions, 1 deletions
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 @@
8LOG_FILE=~/log/.context && touch $LOG_FILE 8LOG_FILE=~/log/.context && touch $LOG_FILE
9PLAN_FILE=~/log/plan.context.md 9PLAN_FILE=~/log/plan.context.md
10context="$(cat ~/.task/context)" 10context="$(cat ~/.task/context)"
11[[ "$@" =~ '-s' ]] && SET=true && shift 11[[ "$*" =~ '-s' ]] && SET=true && shift
12time="$1" 12time="$1"
13 13
14# The unit of time display. For example: 14# The unit of time display. For example:
@@ -76,6 +76,8 @@ _print_spend_time() {
76 # Print context and time I spend 76 # Print context and time I spend
77 echo -ne "$ctx\t\t" 77 echo -ne "$ctx\t\t"
78 date -u -d @"$sec" +%H:%M | tr -d '\n' 78 date -u -d @"$sec" +%H:%M | tr -d '\n'
79 echo -n "/"
80 date -u -d @"$seconds_of_plan" +%H:%M | tr -d '\n'
79 81
80 number_of_spend=$(( $sec / $UNIT )) 82 number_of_spend=$(( $sec / $UNIT ))
81 # Print block of time spend (green) 83 # Print block of time spend (green)