From e14b963927abea87a08bc871aad5b7df430fea39 Mon Sep 17 00:00:00 2001 From: Abhijeet Saroha <108522472+abhijeetSaroha@users.noreply.github.com> Date: Tue, 21 Nov 2023 23:46:40 +0530 Subject: [PATCH] imp : improve help text (#62) --- makim/cli.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/makim/cli.py b/makim/cli.py index 5912245..1a13090 100644 --- a/makim/cli.py +++ b/makim/cli.py @@ -100,6 +100,8 @@ def _get_args(): target_help = [] groups = makim.global_data.get('groups', []) for group in groups: + target_help.append('\n' + group + ':') + target_help.append('-' * (len(group) + 1)) for target_name, target_data in groups[group]['targets'].items(): target_name_qualified = f'{group}.{target_name}' help_text = target_data['help'] if 'help' in target_data else '' @@ -119,8 +121,8 @@ def _get_args(): nargs='?', default=None, help=( - 'Specify the target command to be performed. ' - '\nOptions are:\n' + '\n'.join(target_help) + 'Specify the target command to be performed. Options are:\n' + + '\n'.join(target_help) ), )