summaryrefslogtreecommitdiff
path: root/alot/command.py
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2011-09-15 23:23:38 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2011-09-15 23:23:38 +0100
commit51ce77e10f59629986068e2ae62919e030b2f688 (patch)
treef3ac00bc71a165e3ee9008b126b4d8bcb27b0b06 /alot/command.py
parentcc120c396b32e5115335ee208e0e7b88458f50a5 (diff)
ContactsCompleter respects given order on accounts
Diffstat (limited to 'alot/command.py')
-rw-r--r--alot/command.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/alot/command.py b/alot/command.py
index 229b163e..cb11154a 100644
--- a/alot/command.py
+++ b/alot/command.py
@@ -386,8 +386,11 @@ class ComposeCommand(Command):
#get To header
if 'To' not in self.mail:
- to = yield ui.prompt(prefix='To>',
- completer=ContactsCompleter(ui.accountman))
+ allbooks = settings.config.getboolean('general',
+ 'complete_matching_abook_only')
+ abooks = ui.accountman.get_addressbooks(order=[a],
+ append_remaining=not allbooks)
+ to = yield ui.prompt(prefix='To>',completer=ContactsCompleter(abooks))
if to == None:
ui.notify('canceled')
return