iter_commands: Return sorted results

Fixes #2.
This commit is contained in:
Andreas Oberritter 2022-09-08 17:22:23 +02:00
parent 8ee84ba37d
commit 61c5091ebc
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ def iter_commands(
if depth > 1:
yield f"{'#'*depth} {cliobj.name}"
for name in cliobj.commands:
for name in sorted(cliobj.commands):
yield from iter_commands(
module_name, cmd_chain + [name], cliobj.commands[name], depth=depth + 1
)