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
from argparse import ArgumentParser, ArgumentError
+from argparse import RawDescriptionHelpFormatter
try:
from progress.bar import ShadyBar as KamakiProgressBar
: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
@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={}):