Commit c3c678a4 authored by Louis's avatar Louis
Browse files

[cli.ls] Ajout d'une option --verbose à ls

parent 0727dca3
......@@ -65,6 +65,11 @@ def argument_parser():
),
formatter_class=argparse.RawDescriptionHelpFormatter,
)
ls.add_argument(
"-v", "--verbose",
help="Affiche davantage de détails.",
action="store_true",
)
# Generate
generate_parser = subparsers.add_parser(
......@@ -151,7 +156,10 @@ def do_ls(options): # pylint: disable=unused-argument
"""Perform the `ls` command."""
tests = TestPerformer()
for name in sorted(tests.iter_names()):
print(name) # pylint: disable=superfluous-parens
if options.verbose:
print(u"{}: {}".format(name, tests.exercises[name].description)) # pylint: disable=superfluous-parens
else:
print(name) # pylint: disable=superfluous-parens
COMMANDS = {
"generate": do_generate,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment