|
local REPLY
|
|
zstyle -s ':custom:prompts:covid' country REPLY
|
|
typeset -g _cprompts_covid=($(curl -sL https://api.covid19api.com/country/${REPLY:-germany} | jq -e '. |= sort_by (.Date) | .[-1,-2].Active'))
|
|
[ ! -z $_cprompts_covid[1] ] && <<< ${_cprompts_covid} > $tmpfile
|