I'd like to add a search term argument to notmuch dump (see
id:"87wrcijn1w.fsf@zancas.localnet" and followup for context). The
"notmuch" way would be to have
notmuch dump <search-term>
do the right thing, and that is easy enough _except_ that
notmuch dump foo
writes the output to file foo.
I see several options.
1) just delete the output file option from notmuch-dump, and use shell
redirection. So far I don't see a non-contrived example when writing
an output file directly is useful, but maybe that is just a failure
of imagination.
2) delete the output file option and a global "--write" option that
calls freopen(... stdout). As a bonus(?) this would work for any
notmuch command.
3) leave the output option alone and implement a --query=foo option for
notmuch dump. This would be the most backward compatible of course,
but also confusing for users.
Thoughts?
d