[cmdline] Show commands in alphabetical order

Commands were originally ordered by functional group (e.g. keeping the
image management commands together), with arrays used to impose a
functionally meaningful order within the group.

As the number of commands and functional groups has expanded over the
years, this has become essentially useless as an organising principle.
Switch to sorting commands alphabetically (using the linker table
mechanism).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2025-08-06 16:29:32 +01:00
parent 332241238e
commit 9d4a2ee353
49 changed files with 104 additions and 423 deletions

View File

@@ -21,7 +21,12 @@ struct command {
#define COMMANDS __table ( struct command, "commands" )
#define __command __table_entry ( COMMANDS, 01 )
#define __command( name ) __table_entry ( COMMANDS, _C2 ( 01., name ) )
#define COMMAND( name, exec ) \
struct command name ## _command __command ( name ) = { \
#name, exec \
}
extern char * concat_args ( char **args );