CLI: sort commands alphabetically in help output
Fixes #7964 Added sortSubcommands: true to configureHelp() to display commands in alphabetical order when running 'openclaw --help'.
This commit is contained in:
committed by
Ayaan Zaidi
parent
34424ce536
commit
203e3804b3
@@ -47,6 +47,9 @@ export function configureProgramHelp(program: Command, ctx: ProgramContext) {
|
|||||||
program.option("--no-color", "Disable ANSI colors", false);
|
program.option("--no-color", "Disable ANSI colors", false);
|
||||||
|
|
||||||
program.configureHelp({
|
program.configureHelp({
|
||||||
|
// sort options and subcommands alphabetically
|
||||||
|
sortSubcommands: true,
|
||||||
|
sortOptions: true,
|
||||||
optionTerm: (option) => theme.option(option.flags),
|
optionTerm: (option) => theme.option(option.flags),
|
||||||
subcommandTerm: (cmd) => theme.command(cmd.name()),
|
subcommandTerm: (cmd) => theme.command(cmd.name()),
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user