2020-07-18 22:43:39 +00:00
|
|
|
setopt local_options nomatch
|
2020-06-20 22:10:44 +00:00
|
|
|
feedpath=~/.sfeed/feeds/
|
2020-07-18 22:43:39 +00:00
|
|
|
local tmpfile=$CACHEPATH/rss
|
2020-06-20 22:10:44 +00:00
|
|
|
[ -r $feedpath ] || return
|
|
|
|
local -a cache
|
|
|
|
zstat -A cache +mtime -- $tmpfile 2>/dev/null
|
2020-07-18 22:43:39 +00:00
|
|
|
([ ! -v _cprompts_sfeed ] || [ ${cache[1]:-0} -lt $(($epochtime[1] - 1800)) ]) && cprompts:cache:async:rss &!
|
|
|
|
[ -r $tmpfile ] || return
|
|
|
|
typeset -g _cprompts_sfeed=$(< $tmpfile)
|
2020-06-20 22:10:44 +00:00
|
|
|
[ ${_cprompts_sfeed:-0} -ne 0 ] && p10k segment -b red -i '' -t "+${_cprompts_sfeed:-unknown}"
|