ZSHFiles/p10k-segments/prompt_c_newsboat

8 lines
334 B
Plaintext

[ -v commands\[sqlite3\] ] || return
local REPLY
zstyle -s ':custom:prompts:newsboat' database REPLY
if [ ! -v _cprompts_newsboat ]; then
typeset -g _cprompts_newsboat="$(sqlite3 $REPLY --ascii 'SELECT COUNT(id) FROM rss_item WHERE unread == 1 AND guid GLOB "yt:video:*"')"
fi
p10k segment -b red -i '' -t "${_cprompts_newsboat}"