U_BOOT_CMD(
version, 1, 1, do_version,
- "version - print monitor version\n",
+ "print monitor version",
NULL
);
U_BOOT_CMD(
echo, CONFIG_SYS_MAXARGS, 1, do_echo,
- "echo - echo args to console\n",
+ "echo args to console",
"[args..]\n"
" - echo args to console; \\c suppresses newline\n"
);
U_BOOT_CMD(
test, CONFIG_SYS_MAXARGS, 1, do_test,
- "test - minimal test like /bin/sh\n",
+ "minimal test like /bin/sh",
"[args..]\n"
" - test functionality\n"
);
U_BOOT_CMD(
exit, 2, 1, do_exit,
- "exit - exit script\n",
+ "exit script",
" - exit functionality\n"
);
return 1;
if (usage == NULL)
continue;
- puts (usage);
+ printf("%-*s- %s\n", CONFIG_SYS_HELP_CMD_WIDTH,
+ cmd_array[i]->name, usage);
}
return 0;
}
putc ('\n');
#else /* no long help available */
if (cmdtp->usage)
- puts (cmdtp->usage);
+ printf ("%s - %s\n", cmdtp->name, cmdtp->usage);
#endif /* CONFIG_SYS_LONGHELP */
} else {
printf ("Unknown command '%s' - try 'help'"
U_BOOT_CMD(
help, CONFIG_SYS_MAXARGS, 1, do_help,
- "help - print online help\n",
+ "print online help",
"[command ...]\n"
" - show help information (for 'command')\n"
"'help' prints online help for the monitor commands.\n\n"
#ifdef CONFIG_SYS_LONGHELP
cmd_tbl_t __u_boot_cmd_question_mark Struct_Section = {
"?", CONFIG_SYS_MAXARGS, 1, do_help,
- "? - alias for 'help'\n",
+ "alias for 'help'",
NULL
};
#else
cmd_tbl_t __u_boot_cmd_question_mark Struct_Section = {
"?", CONFIG_SYS_MAXARGS, 1, do_help,
- "? - alias for 'help'\n"
+ "alias for 'help'"
};
#endif /* CONFIG_SYS_LONGHELP */
void cmd_usage(cmd_tbl_t *cmdtp)
{
- printf("Usage:\n%s\n", cmdtp->usage);
+ printf("Usage:\n%s - %s\n\n", cmdtp->name, cmdtp->usage);
}
#ifdef CONFIG_AUTO_COMPLETE