Improved version command & improved help command

This commit is contained in:
2020-12-16 15:09:12 +01:00
parent 5fb20035d8
commit acfe158470
2 changed files with 21 additions and 1 deletions

View File

@@ -9,3 +9,13 @@ class Help(CommandBase):
def run(self, args: list[str]):
Console.write_line('Available Commands:')
commands = [
['help', 'Lists available commands and their short descriptions.'],
['new', 'Creates a new file or package.'],
['version', 'Outputs CPL CLI version.']
]
for name, description in commands:
Console.set_foreground_color('blue')
Console.write(f'\n\t{name} ')
Console.set_foreground_color('default')
Console.write(f'{description}')