Some workaround with % char
This commit is contained in:
parent
eba99ae8af
commit
f9cf2b40e1
1 changed files with 2 additions and 2 deletions
4
pomodoro
4
pomodoro
|
@ -173,13 +173,13 @@ function initLatestTasksFromLogFile() {
|
|||
else
|
||||
latestlogfile="$logfile"
|
||||
fi
|
||||
local cmd="latestTasks=( $( tail -n 5 $latestlogfile | awk '{printf "\""; gsub(/"/,"\\\""); for (i=6;i<=NF;i++) printf $i" "; print "\""}' ) )"
|
||||
local cmd="latestTasks=( $( tail -n 5 $latestlogfile | awk '{printf "\""; gsub(/"/,"\\\""); gsub(/%/,"°/o"); for (i=6;i<=NF;i++) printf $i" "; print "\""}' ) )"
|
||||
eval $cmd
|
||||
}
|
||||
|
||||
function initTodoTasksFromFile() {
|
||||
[[ ! -r $POMODORO_TODO_FILE ]] && return
|
||||
local cmd="todoTasks=( $(< $POMODORO_TODO_FILE | egrep -v '%(wait|done)' | awk '{printf "\""; gsub(/"/,"\\\""); printf $0; print "\""; }') )"
|
||||
local cmd="todoTasks=( $(< $POMODORO_TODO_FILE | egrep -v '%(wait|done)' | awk '{printf "\""; gsub(/"/,"\\\""); gsub(/%/,"°/o"); printf $0; print "\""; }') )"
|
||||
eval $cmd
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue