diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-03-16 19:12:40 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-03-16 19:12:40 +0100 |
commit | 7515515cb889c6bb8435c7eae923891d6b28dd8e (patch) | |
tree | e36e379f040c453497cac535d564d63520580873 /alot/__main__.py | |
parent | efec104994051a54dac147889f69c23f9c1bcb1c (diff) |
main: allow -c to be used multiple times
Merge values from multiple files.
Diffstat (limited to 'alot/__main__.py')
-rw-r--r-- | alot/__main__.py | 6 |
1 files changed, 3 insertions, 3 deletions
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) |