Signed-off-by: Robert Schwebel <r.schwebel@xxxxxxxxxxxxxx> --- commands/edit.c | 36 +++++++++++------------------------- 1 files changed, 11 insertions(+), 25 deletions(-) diff --git a/commands/edit.c b/commands/edit.c index c2ab877..d35097e 100644 --- a/commands/edit.c +++ b/commands/edit.c @@ -550,35 +550,21 @@ out: static const char *edit_aliases[] = { "sedit", NULL}; -static const __maybe_unused char cmd_edit_help[] = -"Usage: (s)edit <file>\n" -"This is a very small editor. Its only features are moving the cursor with\n" -"the usual keys and typing characters.\n" -"<ctrl-c> quits the editor without saving,\n" -"<ctrl-d> quits the editor with saving the current file.\n" -"\n" -"If called as sedit the editor uses ansi codes to scroll the screen.\n"; - -static const __maybe_unused char cmd_edit_usage[] = "edit a file"; +BAREBOX_CMD_HELP_START(edit) +BAREBOX_CMD_HELP_USAGE("(s)edit <file>\n") +BAREBOX_CMD_HELP_SHORT("A small editor. <ctrl-c> is exit, <ctrl-d> exit-with-save.\n") +BAREBOX_CMD_HELP_TEXT ("This is a very small text editor. You can move the cursor around\n") +BAREBOX_CMD_HELP_TEXT ("with the usual keys and type characters.\n") +BAREBOX_CMD_HELP_TEXT ("<ctrl-c> quits the editor without saving,\n") +BAREBOX_CMD_HELP_TEXT ("<ctrl-d> quits the editor with saving the current file.\n") +BAREBOX_CMD_HELP_TEXT (" \n") +BAREBOX_CMD_HELP_TEXT ("If called as sedit, the editor uses ansi codes to scroll the screen.\n") +BAREBOX_CMD_HELP_END BAREBOX_CMD_START(edit) .cmd = do_edit, .aliases = edit_aliases, - .usage = cmd_edit_usage, + .usage = "Usage: (s)edit <file>", BAREBOX_CMD_HELP(cmd_edit_help) BAREBOX_CMD_END - -/** - * @page edit_command edit (editor) - * - * Usage is: [s]edit \<file\> - * - * This is a very small editor. It's only features are moving the cursor with - * the usual keys and typing characters. - * - * \b \<ctrl-c\> quits the editor without saving,\n - * \b \<ctrl-d\> quits the editor with saving the current file. - * - * If called as \c sedit the editor uses ansi codes to scroll the screen. - */ -- 1.7.2.3 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox