From 0a1840b3940db108277de1c113a5c29dd74d7d33 Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Thu, 8 Mar 2018 09:20:20 +0100 Subject: provide retagprompt command in thread mode retagprompt in search mode allows to retag a whole thread. The new thread mode version allows to do the same for each selected message. The common command infers its mode from the UI object that it is passed when applied. Therefore, the docstring (and everything else) is mode-agnostic. When this command command is registered for the wrong mode and applied it raises a KeyError (on purpose). --- alot/commands/thread.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'alot/commands/thread.py') diff --git a/alot/commands/thread.py b/alot/commands/thread.py index 05f73d6a..b6eee44f 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -21,6 +21,7 @@ from .globals import FlushCommand from .globals import ComposeCommand from .globals import MoveCommand from .globals import CommandCanceled +from .common import RetagPromptCommand from .envelope import SendCommand from ..completion import ContactsCompleter, PathCompleter from ..db.utils import decode_header @@ -1080,6 +1081,9 @@ class ThreadSelectCommand(Command): ui.apply_command(ChangeDisplaymodeCommand(visible='toggle')) +RetagPromptCommand = registerCommand(MODE, 'retagprompt')(RetagPromptCommand) + + @registerCommand( MODE, 'tag', forced={'action': 'add'}, arguments=[ -- cgit v1.2.3