blob: 8bfd7e8d1947d1805d8d0ec095d4e5e1194f5a88 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# Copyright (C) 2011-2019 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.settings.const import settings
from alot.helper import formataddr
from .stringlist import StringlistCompleter
class AccountCompleter(StringlistCompleter):
"""Completes users' own mailaddresses."""
def __init__(self, **kwargs):
accounts = settings.get_accounts()
resultlist = [formataddr((a.realname, str(a.address)))
for a in accounts]
super().__init__(resultlist, match_anywhere = True, **kwargs)
|