From 7515515cb889c6bb8435c7eae923891d6b28dd8e Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 16 Mar 2023 19:12:40 +0100 Subject: main: allow -c to be used multiple times Merge values from multiple files. --- alot/__main__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'alot/__main__.py') diff --git a/alot/__main__.py b/alot/__main__.py index d9c69149..1b037ec3 100644 --- a/alot/__main__.py +++ b/alot/__main__.py @@ -31,7 +31,7 @@ def parser(): parser.add_argument('-r', '--read-only', action='store_true', help='open notmuch database in read-only mode') parser.add_argument('-c', '--config', metavar='FILENAME', - action=cargparse.ValidatedStoreAction, + action=cargparse.ValidatedAppendAction, validator=cargparse.require_file, help='configuration file') parser.add_argument('-n', '--notmuch-config', metavar='FILENAME', @@ -101,12 +101,12 @@ def main(): # locate alot config files cpath = options.config - if options.config is None: + if cpath is None: xdg_dir = get_xdg_env('XDG_CONFIG_HOME', os.path.expanduser('~/.config')) alotconfig = os.path.join(xdg_dir, 'alot', 'config') if os.path.exists(alotconfig): - cpath = alotconfig + cpath = [alotconfig] try: settings.read_config(cpath) -- cgit v1.2.3