Slightly tidy up volshell messages.

This commit is contained in:
Mike Auty
2019-09-17 01:04:10 +01:00
parent fb4f8e1d74
commit 38f773fc91
+6 -5
View File
@@ -57,23 +57,24 @@ class Volshell(interfaces.plugins.PluginInterface):
# TODO: provide help, consider generic functions (pslist?) and/or providing windows/linux functions
sys.ps1 = "({}) >>> ".format(self.current_layer)
code.interact(local = self.construct_locals())
code.interact(banner = "\nCall help() to see available functions\n", local = self.construct_locals())
return renderers.TreeGrid([("Terminating", str)], None)
def help(self):
"""Describes the available commands"""
variables = []
print("Methods:")
print("\nMethods:")
for name, item in self.construct_locals().items():
if item.__doc__ and callable(item):
print("{} - {}".format(name, item.__doc__))
print("* {}".format(name))
print(" {}".format(item.__doc__))
else:
variables.append(name)
print("Variables:")
print("\nVariables:")
for var in variables:
print(var)
print(" {}".format(var))
def construct_locals(self) -> Dict[str, Any]:
"""Returns a dictionary listing the functions to be added to the