summaryrefslogtreecommitdiff
path: root/alot/init.py
diff options
context:
space:
mode:
authorJakob <jakob@pipefour.org>2012-04-03 11:01:56 -0700
committerJakob <jakob@pipefour.org>2012-04-03 11:01:56 -0700
commit38c07a72c1afa1199fab7d527b5a515ded764c55 (patch)
tree244555f9eb1bc3b976870dc0254e16d9b987c835 /alot/init.py
parentf91b696b66610d406174dce921fbaf497d0d1971 (diff)
Add notmuch-config switch back in.
The order of overriding is (highest priority first): command-line switch (--notmuch-config) environment variable ($NOTMUCH_CONFIG) default (~/.notmuch-config)
Diffstat (limited to 'alot/init.py')
-rwxr-xr-xalot/init.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/alot/init.py b/alot/init.py
index 7191324c..a9145de8 100755
--- a/alot/init.py
+++ b/alot/init.py
@@ -85,6 +85,7 @@ class Options(usage.Options):
optParameters = [
['config', 'c', None, 'config file'],
+ ['notmuch-config', 'n', None, 'notmuch config'],
['colour-mode', 'C', None, 'terminal colour mode', colourint],
['mailindex-path', 'p', None, 'path to notmuch index'],
['debug-level', 'd', 'info', 'debug log', debuglogstring],
@@ -136,9 +137,10 @@ def main():
configfiles.insert(0, expanded_path)
# locate notmuch config
- notmuchconfig = os.path.expanduser(os.environ.get('NOTMUCH_CONFIG',
- '~/.notmuch-config'))
-
+ notmuchpath = os.environ.get('NOTMUCH_CONFIG', '~/.notmuch-config')
+ if args['notmuch-config']:
+ notmuchpath = args['notmuch-config']
+ notmuchconfig = os.path.expanduser(notmuchpath)
alotconfig = None
# read the first alot config file we find