Commit 22009e58 authored by S. Zeid's avatar S. Zeid

[cli/engine/commands/shell] set usage/description in add_args based on __is_shell

parent 7a027f7c
......@@ -65,7 +65,6 @@ class ShellCommand(Command):
names = ["shell", "sh"]
add_help = False
description = None
sort_group = -2.2
usage = "[options [...]] [command [args [...]]]"
......@@ -79,8 +78,9 @@ class ShellCommand(Command):
return self.real_output_format if self.__use_real_output_format else ""
def add_args(self, p, cli):
p.usage = self.usage
p.description = self.description or cli.description
if not self.__is_shell:
p.usage = self.usage
p.description = cli.description
if self.__is_shell:
p.add_argument("--help", "-h", action="store_true",
help='show this help and exit')
......@@ -270,10 +270,6 @@ class ShellCommand(Command):
cmd = self.__class__(cli)
cmd.argv = [self.argv[0], "--help"]
cmd.__is_shell = not for_program
if cmd.__is_shell:
cmd.usage = None
for i in cmd._parse_args(cli):
pass
if cmd.__is_shell:
cmd.arg_parser.description = cmd.__doc__
return cmd.arg_parser.format_help()
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