summaryrefslogtreecommitdiff
path: root/alot/commands/taglist.py
blob: 8700dc539fa1b94c1ca78b8128f62fe57b838180 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
from alot.commands import Command, registerCommand
from alot.commands.globals import SearchCommand

MODE = 'taglist'


@registerCommand(MODE, 'select')
class TaglistSelectCommand(Command):
    """search for messages with selected tag"""
    def apply(self, ui):
        tagstring = ui.current_buffer.get_selected_tag()
        cmd = SearchCommand(query=['tag:"%s"' % tagstring])
        ui.apply_command(cmd)