From 1209bd94b60cb85c756d937ad9cada69f2428397 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sat, 21 Feb 2015 23:16:52 +0100 Subject: Add a -c/--check-config option to check the config file It displays the missing options and the ones which are changed from the default values. --- src/args.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/args.py') diff --git a/src/args.py b/src/args.py index 637d3158..a67a0142 100644 --- a/src/args.py +++ b/src/args.py @@ -11,14 +11,17 @@ def parse_args(CONFIG_PATH=''): """ Parse the arguments from the command line """ - parser = ArgumentParser() + parser = ArgumentParser('poezio') + parser.add_argument("-c", "--check-config", dest="check_config", + action='store_true', + help=_('Check the config file')) + parser.add_argument("-d", "--debug", dest="debug", + help=_("The file where debug will be written"), + metavar="DEBUG_FILE") parser.add_argument("-f", "--file", dest="filename", default=path.join(CONFIG_PATH, 'poezio.cfg'), help=_("The config file you want to use"), metavar="CONFIG_FILE") - parser.add_argument("-d", "--debug", dest="debug", - help=_("The file where debug will be written"), - metavar="DEBUG_FILE") parser.add_argument("-v", "--version", dest="version", help=SUPPRESS, metavar="VERSION", default="0.9-dev") -- cgit v1.2.3