diff --git a/alot/commands/thread.py b/alot/commands/thread.py index f02b65e4a..a33452df4 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -635,7 +635,8 @@ def apply(self, ui): (['--all'], {'action': 'store_true', 'help': 'pass all messages'}), (['--format'], {'help': 'output format', 'default': 'raw', 'choices': [ - 'raw', 'decoded', 'id', 'filepath', 'mimepart']}), + 'raw', 'decoded', 'id', 'filepath', 'mimepart', + 'plain', 'html']}), (['--separately'], {'action': 'store_true', 'help': 'call command once for each message'}), (['--background'], {'action': 'store_true', @@ -746,7 +747,9 @@ async def apply(self, ui): bodytext = msg.get_body_text() msgtext = '%s\n\n%s' % (headertext, bodytext) pipestrings.append(msgtext) - elif self.output_format == 'mimepart': + elif self.output_format in ['mimepart', 'plain', 'html']: + if self.output_format in ['plain', 'html']: + mimepart = get_body_part(mail, self.output_format) pipestrings.append(string_sanitize(remove_cte( msg.mime_part, as_string=True))) diff --git a/docs/source/usage/modes/thread.rst b/docs/source/usage/modes/thread.rst index 62a8765a8..155b50dd0 100644 --- a/docs/source/usage/modes/thread.rst +++ b/docs/source/usage/modes/thread.rst @@ -72,7 +72,7 @@ The following commands are available in thread mode: optional arguments :---all: pass all messages - :---format: output format; valid choices are: 'raw','decoded','id','filepath','mimepart' (defaults to: 'raw') + :---format: output format; valid choices are: 'raw','decoded','id','filepath','mimepart','plain','html' (defaults to: 'raw') :---separately: call command once for each message :---background: don't stop the interface :---add_tags: add 'Tags' header to the message