Open schildbach opened 3 years ago
I agree this is annoying, I struggle with the same problem since I started writing btrbk, and there is no good solution for this. The problem is that some (most?) mail clients outsmart the specs and replace text/plain mails by quotations, emoticons, emphasis, ... So the only "correct" solution is to disable these features in the client.
Known workarounds:
sed 's/^/ /'
.--table
or --long
options, which prints the output in a tabular form. Hard to read. >>>
output. I'd hate to do this, as I'm sure there are some people relying on the output formatting. And it's wrong. Next bug would be to remove +++
and ===
because application X interprets it.Is it possible to use some special header or different content-type which tells "smart" mail clients to display the text as-is?
I can very much understand your hesitation to outsmart mail clients, but on the other hand they are unlikely to change this behaviour. I hope we can find a solution that is based on headers.
However, independent from the quotation issue: indenting all "action lines" (and only those) by two or more spaces would improve readbility, much like those lines are indented in the Legend, too. It would even be an improvement for normal shell output I guess.
I got a suggestion to maybe use content-type: text/html
and then put the payload into a <pre>
tag.
Implemented workaround which allows to prefix btrbk command output:
You can even prefix the lines with zero-width whitespace (note that for me, thunderbird-78.8.0 starts changing the line height for some reasons).
Prefixing with .
looks good for me, single whitespace also works.
mail_cmd_block_prefix='\\u200B' # zero-width whitespace
mail_cmd_block_prefix=". "
I got a suggestion to maybe use content-type: text/html and then put the payload into a
<pre>
tag.
This would work, but sending out html mails from a server is probably not the best idea.
I'm using btrbk 0.27.1 wrapped inside the supplied
btrbk-mail
script, which sends me an email about success or failure. Unfortunately, the output of btrbk contains consecutive lines starting with>>>
which is intepreted as email quotes by email cliens (Thunderbird in my case), making the email hard to read.I would like to propose to use other characters instead. Maybe
»»»
?Alternatively maybe a leading space would prevent the formatting? Or maybe there is an email header that can prevent formatting?