Commit 2703cceb authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

Formated output in long command description

parent ec51b97c
......@@ -302,7 +302,7 @@ def update_parser_help(parser, cmd):
parser.syntax += ' <...>'
if cmd.has_description:
parser.parser.description = cmd.help\
+ ((' . . . %s' % description) if description else '')
+ (('\n%s' % description) if description else '')
else:
parser.parser.description = description
......
......@@ -38,6 +38,7 @@ from logging import getLogger
from argparse import ArgumentParser, ArgumentError
from argparse import RawDescriptionHelpFormatter
try:
from progress.bar import ShadyBar as KamakiProgressBar
......@@ -373,7 +374,8 @@ class ArgumentParseManager(object):
:param arguments: (dict) if given, overrides the global _argument as
the parsers arguments specification
"""
self.parser = ArgumentParser(add_help=False)
self.parser = ArgumentParser(add_help=False,
formatter_class=RawDescriptionHelpFormatter)
self.syntax = '%s <cmd_group> [<cmd_subbroup> ...] <cmd>' % exe
if arguments:
self.arguments = arguments
......
......@@ -280,9 +280,11 @@ class _store_container_command(_store_account_command):
@command(pithos_cmds)
class store_list(_store_container_command):
"""List containers, object trees or objects in a directory
without parameters for a list of containers,
with one parameter (container) for the contents of a container,
with <container>:<prefix> for all contents starting with prefix
Use with:
1 no parameters : containers in set account
2. one parameter (container) or --container : contents of container
3. <container>:<prefix> or --container=<container> <prefix>: objects in
container starting with prefix
"""
def __init__(self, arguments={}):
......
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