shell: Include the command help when listing all commands
Most commands provide a short string to describe the parameters it takes. Provide this help text as part of the list of supported commands for each module. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
7d71c0656f
commit
c87ecf58de
1 changed files with 4 additions and 1 deletions
|
@ -216,7 +216,10 @@ static void print_module_commands(const int module)
|
|||
printk("help\n");
|
||||
|
||||
for (i = 0; shell_module->commands[i].cmd_name; i++) {
|
||||
printk("%s\n", shell_module->commands[i].cmd_name);
|
||||
printk("%-28s %s\n",
|
||||
shell_module->commands[i].cmd_name,
|
||||
shell_module->commands[i].help ?
|
||||
shell_module->commands[i].help : "");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue