refac(scripts/him): search unseen using imap

This commit is contained in:
Dmitriy Pleshevskiy 2022-05-24 11:00:03 +03:00
parent 83c345e56d
commit 6c8f54fc2f

View file

@ -16,7 +16,7 @@ case $1 in
a=0
for acc in $(NO_COLOR=1 $bin accounts | grep imap | awk '{ print $1 }')
do
a=$((a+$($bin -a "$acc" list | grep '✷' | wc -l)))
a=$((a+$($bin -a "$acc" search unseen | grep '✷' | wc -l)))
done
echo $a
;;
@ -31,7 +31,7 @@ case $1 in
;;
"mark-read")
for id in $(NO_COLOR=1 $bin -a $2 list -s 20 | grep '✷'| awk '{ print $1 }')
for id in $(NO_COLOR=1 $bin -a $2 search unseen | grep '✷'| awk '{ print $1 }')
do
$bin -a $2 flag add $id seen
done