summaryrefslogtreecommitdiffstats
path: root/commands/edit.c
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2010-07-12 19:48:18 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2010-11-01 16:23:08 +0100
commit7f89e29fac8c6df97ed6e31bb618181a6d258eec (patch)
tree5007c2c45df985a32b90053c5a114a6ab7ef9217 /commands/edit.c
parentcaaab184710a7cee9db5f6ee3e6e7fe6eb20a48c (diff)
downloadbarebox-7f89e29fac8c6df97ed6e31bb618181a6d258eec.tar.gz
barebox-7f89e29fac8c6df97ed6e31bb618181a6d258eec.tar.xz
doc: unify documentation for 'edit'
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Diffstat (limited to 'commands/edit.c')
-rw-r--r--commands/edit.c38
1 files changed, 14 insertions, 24 deletions
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 <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";
+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_END
-static const __maybe_unused char cmd_edit_usage[] = "edit a file";
+/**
+ * @page edit_command
+
+<p> 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. </p>
+
+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 <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.
- */