Tom Willemse
e7bac680ad
This also handles finding 0 emails that have the ‘deleted’ tag without showing an error.
13 lines
268 B
Scheme
Executable file
13 lines
268 B
Scheme
Executable file
#!/usr/bin/env sh
|
|
# # -*- mode:scheme; -*-
|
|
IFS=" "
|
|
exec scsh -s "$0" "$@"
|
|
!#
|
|
|
|
(define deleted
|
|
(run/sexp (notmuch search --output=files --format=sexp tag:deleted)))
|
|
|
|
(if (> (length deleted) 0)
|
|
(map (lambda (mail) (run (rm -v ,mail))) deleted))
|
|
|
|
(run (mbsync -a))
|