Skip to content

Commit

Permalink
imp : improve help text (osl-incubator#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhijeetSaroha authored Nov 21, 2023
1 parent 08faa00 commit e14b963
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions makim/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ''
Expand All @@ -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)
),
)

Expand Down

0 comments on commit e14b963

Please sign in to comment.