diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2015-04-10 11:03:21 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2015-04-15 13:08:07 +0100 |
commit | c68e23cc2501ba2aa22a2c60dc7214224d68e579 (patch) | |
tree | 5c7d12c416cf1ac0ba30ea0e6c94cd3d55d70a6a /alot | |
parent | 637b679003b353d2630fed8ca942f3ab522e68b5 (diff) |
config setting: shellcommand_external_filtering
that exposes ExternalAddressbook's new functionality
Diffstat (limited to 'alot')
-rw-r--r-- | alot/defaults/alot.rc.spec | 7 | ||||
-rw-r--r-- | alot/settings/manager.py | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/alot/defaults/alot.rc.spec b/alot/defaults/alot.rc.spec index df81c432..e0525279 100644 --- a/alot/defaults/alot.rc.spec +++ b/alot/defaults/alot.rc.spec @@ -301,3 +301,10 @@ prefer_plaintext = boolean(default=False) # contacts file used for type 'abook' address book abook_contacts_file = string(default='~/.abook/addressbook') + + # (shellcommand addressbooks) + # let the external command do the filtering when looking up addresses. + # If set to True, the command is fired with the given search string + # as parameter. Otherwise, the command is fired without additional parameters + # and the result list is filtered according to the search string. + shellcommand_external_filtering = boolean(default=True) diff --git a/alot/settings/manager.py b/alot/settings/manager.py index efceee53..9dfe52b0 100644 --- a/alot/settings/manager.py +++ b/alot/settings/manager.py @@ -128,8 +128,10 @@ class SettingsManager(object): cmd = abook['command'] regexp = abook['regexp'] if cmd is not None and regexp is not None: - args['abook'] = ExternalAddressbook(cmd, regexp) - + ef = abook['shellcommand_external_filtering'] + args['abook'] = ExternalAddressbook(cmd, + regexp, + external_filtering=ef) else: msg = 'underspecified abook of type \'shellcommand\':' msg += '\ncommand: %s\nregexp:%s' % (cmd, regexp) |