diff --git a/soypak/cli/commands/help.py b/soypak/cli/commands/help.py new file mode 100644 index 0000000..369a6c9 --- /dev/null +++ b/soypak/cli/commands/help.py @@ -0,0 +1,24 @@ +import argparse +import soypak.cli.command as command + + +class Help(command.Command, metaclass=command.RegisterCommand): + __doc__ = """Display the help message of the give command(s), or print this message. + +Usage: help [, , ..., ] +""" + + __cmd_name__ = "help" + + def __init__(self, *, data = argparse.Namespace, args: list[str] = []) -> None: + super().__init__() + self.data = data + self.rargs = args + + + def run(self): + print("running command: %s" % __name__) + print(self.data, self.rargs) + + if not self.rargs: + self.parser.print_help()