diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2011-10-18 14:56:43 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2011-10-18 14:56:43 +0100 |
commit | bee3b9d6b834c152082f9dd4e1de4aea39647616 (patch) | |
tree | 3a08c83173e29f2645eda27484181cbd371a5cbe | |
parent | 2abe2e3f6ab3ab13eb9af05736eadbe18fcd6de4 (diff) |
unset command in envelope buffer
-rw-r--r-- | alot/commands/envelope.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py index 7813c130..38211c6c 100644 --- a/alot/commands/envelope.py +++ b/alot/commands/envelope.py @@ -221,3 +221,16 @@ class EnvelopeSetCommand(Command): mail[self.key] = self.value envelope.set_email(mail) envelope.rebuild() + + +@registerCommand(MODE, 'unset', help='remove header field', arguments=[ + (['key'], {'help':'header to refine'})]) +class EnvelopeSetCommand(Command): + def __init__(self, key, **kwargs): + self.key = key + Command.__init__(self, **kwargs) + + def apply(self, ui): + mail = ui.current_buffer.get_email() + del(mail[self.key]) + ui.current_buffer.set_email(mail) |