This might be useful to avoid non-zero returncodes when there are no search
results and xargs' command expect one or more arguments, like in `rm`.
It can also be used to purge mail files from disk:
It can also be used to purge mail files from disk:
- $ notmuch search --format=text0 --output=files tag:deleted | xargs -0 rm
+ $ notmuch search --format=text0 --output=files tag:deleted | xargs -0 --no-run-if-empty rm
Make sure you run "notmuch new" after the last command so the database
becomes aware that the files have been removed and can remove the
Make sure you run "notmuch new" after the last command so the database
becomes aware that the files have been removed and can remove the