From 7f89e29fac8c6df97ed6e31bb618181a6d258eec Mon Sep 17 00:00:00 2001 From: Robert Schwebel Date: Mon, 12 Jul 2010 19:48:18 +0200 Subject: doc: unify documentation for 'edit' Signed-off-by: Robert Schwebel --- commands/edit.c | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) (limited to 'commands/edit.c') diff --git a/commands/edit.c b/commands/edit.c index c2ab8775a9..ca40d5921b 100644 --- a/commands/edit.c +++ b/commands/edit.c @@ -550,35 +550,25 @@ out: static const char *edit_aliases[] = { "sedit", NULL}; -static const __maybe_unused char cmd_edit_help[] = -"Usage: (s)edit \n" -"This is a very small editor. Its only features are moving the cursor with\n" -"the usual keys and typing characters.\n" -" quits the editor without saving,\n" -" quits the editor with saving the current file.\n" -"\n" -"If called as sedit the editor uses ansi codes to scroll the screen.\n"; +BAREBOX_CMD_HELP_START(edit) +BAREBOX_CMD_HELP_USAGE("(s)edit \n") +BAREBOX_CMD_HELP_SHORT("A small editor. is exit, exit-with-save.\n") +BAREBOX_CMD_HELP_END -static const __maybe_unused char cmd_edit_usage[] = "edit a file"; +/** + * @page edit_command + +

Barebox contains a small text editor which can be used to edit +config files in /env. You can move the cursor around with the arrow keys +and type characters.

+ +If called as sedit, the editor uses ansi codes to scroll the screen. + */ BAREBOX_CMD_START(edit) .cmd = do_edit, .aliases = edit_aliases, - .usage = cmd_edit_usage, + .usage = "Usage: (s)edit ", BAREBOX_CMD_HELP(cmd_edit_help) BAREBOX_CMD_END - -/** - * @page edit_command edit (editor) - * - * Usage is: [s]edit \ - * - * This is a very small editor. It's only features are moving the cursor with - * the usual keys and typing characters. - * - * \b \ quits the editor without saving,\n - * \b \ quits the editor with saving the current file. - * - * If called as \c sedit the editor uses ansi codes to scroll the screen. - */ -- cgit v1.2.3