Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def show_command_help_listing(self):
table = chunks(sorted(helpcommands.keys()), 6)
return [(None, table, [], None)]
def show_command_help(self, pattern, **_):
command = pattern.strip().upper()
message = ""
if not command:
return self.show_command_help_listing()
if command in helpcommands:
helpcommand = helpcommands[command]
if "description" in helpcommand:
message += helpcommand["description"]
if "synopsis" in helpcommand:
message += "\nSyntax:\n"
message += helpcommand["synopsis"]
else:
message = "No help available for \"%s\"" % pattern
message += "\nTry \h with no arguments to see available help."
return [(None, None, None, message)]