diff options
author | Juergen Beisert <j.beisert@pengutronix.de> | 2007-11-08 12:01:52 +0100 |
---|---|---|
committer | Juergen Beisert <j.beisert@pengutronix.de> | 2007-11-08 12:01:52 +0100 |
commit | 8fe25ecf1270ab08e0b3baf5e8bae91e8f55eaa9 (patch) | |
tree | e7688eb0e6b8a5c8aba5c810719d41888c7de926 /commands/edit.c | |
parent | 0a13be8de25ea2ba37f156fbfac0555125f651f3 (diff) | |
download | barebox-8fe25ecf1270ab08e0b3baf5e8bae91e8f55eaa9.tar.gz barebox-8fe25ecf1270ab08e0b3baf5e8bae91e8f55eaa9.tar.xz |
adding various doku
Diffstat (limited to 'commands/edit.c')
-rw-r--r-- | commands/edit.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/commands/edit.c b/commands/edit.c index 0795d88abc..3a685ebeef 100644 --- a/commands/edit.c +++ b/commands/edit.c @@ -1,6 +1,4 @@ /* - * edit.c - A tiny editor implementation - * * Copyright (c) 2007 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix * * See file CREDITS for list of people who contributed to this @@ -20,6 +18,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/** + * @file + * @brief A tiny editor implementation + */ + #include <common.h> #include <command.h> #include <malloc.h> @@ -398,6 +401,7 @@ static int do_edit(cmd_tbl_t * cmdtp, int argc, char *argv[]) return 1; } + /* check if we are called as "sedit" insted of "edit" */ if (*argv[0] == 's') smartscroll = 1; @@ -564,3 +568,18 @@ U_BOOT_CMD_START(edit) .usage = "edit a file", U_BOOT_CMD_HELP(cmd_edit_help) U_BOOT_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. + */ |