2025-02-04 21:02:12 -08:00
|
|
|
#!/usr/bin/env zsh
|
|
|
|
|
|
2025-10-09 22:40:38 -07:00
|
|
|
let greather_than_zero=0
|
|
|
|
|
if [[ "${1}" == '-g' ]]; then
|
|
|
|
|
greather_than_zero=1
|
|
|
|
|
fi
|
|
|
|
|
|
2025-04-30 22:25:45 +09:00
|
|
|
lines=(${(f)"$(mu find '(maildir:/protonmail/Inbox or maildir:/ucsc-gmail/Inbox) AND flag:unread' 2>/dev/null)"})
|
2025-10-09 22:40:38 -07:00
|
|
|
if [[ ${#lines} > 0 ]] || ! (( greather_than_zero )); then
|
|
|
|
|
printf '%d' "${#lines}"
|
|
|
|
|
fi
|