ZSHFiles/p10k-segments/prompt_c_new_mail

7 lines
250 B
Plaintext
Raw Permalink Normal View History

local REPLY
zstyle -s ':custom:prompts:mail' glob REPLY
local new_mails=(${~REPLY}(.N))
typeset -g _cprompts_mail_count=${#new_mails}
[[ ${_cprompts_mail_count} -gt 0 ]] || return
p10k segment -b yellow -i '' -t "${_cprompts_mail_count:-unknown}"