diff options
Diffstat (limited to 'bin/task')
| -rwxr-xr-x | bin/task/context | 4 |
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 @@ | |||
| 8 | LOG_FILE=~/log/.context && touch $LOG_FILE | 8 | LOG_FILE=~/log/.context && touch $LOG_FILE |
| 9 | PLAN_FILE=~/log/plan.context.md | 9 | PLAN_FILE=~/log/plan.context.md |
| 10 | context="$(cat ~/.task/context)" | 10 | context="$(cat ~/.task/context)" |
| 11 | [[ "$@" =~ '-s' ]] && SET=true && shift | 11 | [[ "$*" =~ '-s' ]] && SET=true && shift |
| 12 | time="$1" | 12 | time="$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) |