Commit 53e1f8d5 authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

Allow params starting with - (e.g. history run)

parent 87c00d4e
......@@ -179,7 +179,8 @@ class Shell(Cmd):
cls = subcmd.get_class()
ldescr = getattr(cls, 'long_description', '')
if subcmd.path == 'history_run':
instance = cls(dict(cmd_parser.arguments),
instance = cls(
dict(cmd_parser.arguments),
self.cmd_tree)
else:
instance = cls(dict(cmd_parser.arguments))
......@@ -200,10 +201,12 @@ class Shell(Cmd):
arg.value = getattr(cmd_parser.parsed, name,
arg.default)
exec_cmd(instance,
[term for term in cmd_parser.unparsed\
if not term.startswith('-')],
exec_cmd(
instance,
cmd_parser.unparsed,
cmd_parser.parser.print_help)
#[term for term in cmd_parser.unparsed\
# if not term.startswith('-')],
except (ClientError, CLIError) as err:
print_error_message(err)
elif ('-h' in cmd_args or '--help' in cmd_args) \
......
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