-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelp.py
39 lines (35 loc) · 1.46 KB
/
help.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from rich.markup import escape
from console import console
commands = [
{"command": "load <module>", "description": "Load a specific module"},
{"command": "back", "description": "Unload a module"},
{"command": "show", "description": "Show module info and options"},
{"command": "set <option> <value>", "description": "Assign value to an option"},
{"command": "unset <option>", "description": "Set null an option"},
{
"command": "global <option> <value>",
"description": "Assign value to a global option",
},
{"command": "run", "description": "Start the module"},
{"command": "jobs", "description": "Show jobs in background"},
{
"command": "networks",
"description": "Manage and interact with network configurations (add, remove, show, alias)",
},
{
"command": "wallets",
"description": "Manage and interact with wallet configurations (add, remove, show, alias)",
},
{"command": "help", "description": "Show this text"},
{
"command": "# system_command",
"description": "Executes a command on the local system",
},
{"command": "quit", "description": "Bye bye matildapp!"},
]
def show_help():
for command in commands:
console.print(escape(command["command"]), style="yellow")
console.print(f"{'-' * len(command['command'])}")
console.print(f'|_ {command["description"]}')
console.print()