Browse Source

Some workaround with % char

master
parent
commit
f9cf2b40e1
  1. 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…
Cancel
Save