From 52af58e39af8ac006c62d1788b6672966b2a9f47 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Fri, 7 Apr 2023 12:46:42 +0800 Subject: Update --- bin/task/context | 2 +- bin/unix/timer.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/task/context b/bin/task/context index 76e1984..75597b3 100755 --- a/bin/task/context +++ b/bin/task/context @@ -18,7 +18,7 @@ if [ -n "$1" ]; then fi done <$LOG_FILE if [ "$update" = true ]; then - sed -i -E "s/^$context.*/$context\t$summary" $LOG_FILE + sed -i -E "s/^$context.*/$context\t$summary/" $LOG_FILE else echo -e "$context\t$count" >>$LOG_FILE fi diff --git a/bin/unix/timer.sh b/bin/unix/timer.sh index b4f48c5..b7f941e 100755 --- a/bin/unix/timer.sh +++ b/bin/unix/timer.sh @@ -8,6 +8,8 @@ SIGNAL=${1:-SIGTERM} COMMAND_START="$2" COMMAND_EXIT="$3" +[ -n "$COLOR" ] && echo -en "\e[${COLOR}m" + # If SIGNAL is received, switch to next display trap 'next_display' "$SIGNAL" # Use SIGTSTP (Ctrl-Z in most of the cases) to stop/restart timer -- cgit v1.2.3-70-g09d2