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
|
else
|
||||||
latestlogfile="$logfile"
|
latestlogfile="$logfile"
|
||||||
fi
|
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
|
eval $cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
function initTodoTasksFromFile() {
|
function initTodoTasksFromFile() {
|
||||||
[[ ! -r $POMODORO_TODO_FILE ]] && return
|
[[ ! -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
|
eval $cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue