Skip to content

Commit

Permalink
feat(help): Organize tasks by group inside the help menu
Browse files Browse the repository at this point in the history
  • Loading branch information
xmnlab committed Jul 24, 2024
1 parent 3fd8d42 commit 913e2a2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/makim/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,13 @@ def create_dynamic_command(name: str, args: Dict[str, str]) -> None:
args_param_list.append(f'"--{arg}": {arg_clean}')

args_param_str = '{' + ','.join(args_param_list) + '}'
decorator = app.command(name, help=args.get('help', ''))
group_name = name.split('.')[0]

decorator = app.command(
name,
help=args.get('help', ''),
rich_help_panel=group_name,
)

function_code = (
f'def dynamic_command({args_str}):\n'
Expand Down

0 comments on commit 913e2a2

Please sign in to comment.