diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2011-08-17 19:03:51 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2011-08-17 19:03:51 +0100 |
commit | 2a8f34cfb9e5815ab0b57f64d6a6616da4edeefb (patch) | |
tree | 0881a48771ee04fce04aea65d6ec1745a55950ad /alot/init.py | |
parent | 86af234229e3986f6e46c06f35ba51e0ad710f25 (diff) |
access notmuch's config via settings.notmuchconfig
This adds a comdline option "-n" to specify the location of
notmuch's config file and splits the CustomConfigparser
Diffstat (limited to 'alot/init.py')
-rwxr-xr-x | alot/init.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/alot/init.py b/alot/init.py index 689e677d..e5a13a5b 100755 --- a/alot/init.py +++ b/alot/init.py @@ -31,7 +31,10 @@ def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('-c', dest='configfile', default='~/.alot.rc', - help='config file') + help='alot\'s config file') + parser.add_argument('-n', dest='notmuchconfigfile', + default='~/.notmuch-config', + help='notmuch\'s config file') parser.add_argument('-C', dest='colours', type=int, choices=[1, 16, 256], @@ -61,6 +64,8 @@ def main(): #read config file configfilename = os.path.expanduser(args.configfile) settings.config.read(configfilename) + notmuchfile = os.path.expanduser(args.notmuchconfigfile) + settings.notmuchconfig.read(notmuchfile) settings.hooks.setup(settings.config.get('general', 'hooksfile')) # setup logging |