[notmuch] Replace pre-new script with SCSH script
This also handles finding 0 emails that have the ‘deleted’ tag without showing an error.
This commit is contained in:
parent
6c3bf82014
commit
e7bac680ad
1 changed files with 12 additions and 3 deletions
|
@ -1,4 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
# # -*- mode:scheme; -*-
|
||||
IFS=" "
|
||||
exec scsh -s "$0" "$@"
|
||||
!#
|
||||
|
||||
notmuch search --output=files tag:deleted | tr '\n' '\0' | xargs -0 -L 1 rm -v
|
||||
mbsync -a
|
||||
(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))
|
||||
|
|
Loading…
Reference in a new issue