From 38c07a72c1afa1199fab7d527b5a515ded764c55 Mon Sep 17 00:00:00 2001 From: Jakob Date: Tue, 3 Apr 2012 11:01:56 -0700 Subject: 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) --- alot/init.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'alot/init.py') 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 -- cgit v1.2.3