diff options
Diffstat (limited to 'alot/commands')
-rw-r--r-- | alot/commands/thread.py | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py index 801e798b..60c46b93 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -610,8 +610,6 @@ class ChangeDisplaymodeCommand(Command): 'help': 'let the shell interpret the command'}), (['--notify_stdout'], {'action': 'store_true', 'help': 'display cmd\'s stdout as notification'}), - (['--field_key'], {'help': 'mailcap field key for decoding', - 'default': 'copiousoutput'}), ]) class PipeCommand(Command): @@ -621,8 +619,7 @@ class PipeCommand(Command): def __init__(self, cmd, all=False, separately=False, background=False, shell=False, notify_stdout=False, format='raw', add_tags=False, noop_msg='no command specified', - confirm_msg='', done_msg=None, field_key='copiousoutput', - **kwargs): + confirm_msg='', done_msg=None, **kwargs): """ :param cmd: shellcommand to open :type cmd: str or list of str @@ -632,15 +629,15 @@ class PipeCommand(Command): :type separately: bool :param background: do not suspend the interface :type background: bool - :param notify_stdout: display command\'s stdout as notification message - :type notify_stdout: bool :param shell: let the shell interpret the command :type shell: bool - - 'raw': message content as is, - 'decoded': message content, decoded quoted printable, - 'id': message ids, separated by newlines, - 'filepath': paths to message files on disk + :param notify_stdout: display command\'s stdout as notification message + :type notify_stdout: bool + :param format: what to pipe to the processes stdin. one of: + 'raw': message content as is, + 'decoded': message content, decoded quoted printable, + 'id': message ids, separated by newlines, + 'filepath': paths to message files on disk :type format: str :param add_tags: add 'Tags' header to the message :type add_tags: bool @@ -651,8 +648,6 @@ class PipeCommand(Command): :type confirm_msg: str :param done_msg: notification message to show upon success :type done_msg: str - :param field_key: malcap field key for decoding - :type field_key: str """ Command.__init__(self, **kwargs) if isinstance(cmd, str): @@ -668,7 +663,6 @@ class PipeCommand(Command): self.noop_msg = noop_msg self.confirm_msg = confirm_msg self.done_msg = done_msg - self.field_key = field_key async def apply(self, ui): # abort if command unset @@ -712,7 +706,7 @@ class PipeCommand(Command): pipestrings.append(mail.as_string()) elif self.output_format == 'decoded': headertext = extract_headers(mail) - bodytext = extract_body(mail, field_key=self.field_key) + bodytext = extract_body(mail) msgtext = '%s\n\n%s' % (headertext, bodytext) pipestrings.append(msgtext) |