summaryrefslogtreecommitdiff
path: root/alot/commands/taglist.py
blob: c21a7c6a0e4772e433170d8c927519125b5928e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Copyright (C) 2011-2012  Patrick Totzke <patricktotzke@gmail.com>
# This file is released under the GNU GPL, version 3 or a later revision.
# For further details see the COPYING file
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)