From a3921e369f5d7381042d5b4d2c5a01155c496ec6 Mon Sep 17 00:00:00 2001 From: Robert Schwebel Date: Mon, 1 Nov 2010 17:32:34 +0100 Subject: doc: unify documentation for 'printenv' Signed-off-by: Robert Schwebel --- commands/printenv.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) (limited to 'commands/printenv.c') diff --git a/commands/printenv.c b/commands/printenv.c index e6fc0e4e55..4078bbcc34 100644 --- a/commands/printenv.c +++ b/commands/printenv.c @@ -65,26 +65,22 @@ static int do_printenv(struct command *cmdtp, int argc, char *argv[]) return 0; } -static const __maybe_unused char cmd_printenv_help[] = -"\n - print values of all environment variables\n" -"printenv name ...\n" -" - print value of environment variable 'name'\n"; +BAREBOX_CMD_HELP_START(printenv) +BAREBOX_CMD_HELP_USAGE("printenv [variable]\n") +BAREBOX_CMD_HELP_SHORT("Print value of one or all environment variables.\n") +BAREBOX_CMD_HELP_END +/** + * @page printenv_command + +

If an argument is given, printenv prints the content of an environment +variable to the terminal. If no argument is specified, all variables are +printed.

+ + */ BAREBOX_CMD_START(printenv) .cmd = do_printenv, - .usage = "print environment variables", + .usage = "Print value of one or all environment variables.", BAREBOX_CMD_HELP(cmd_printenv_help) BAREBOX_CMD_END - -/** - * @page printenv_command printenv - * - * Usage: printenv [\] - * - * Print environment variables. - * If \ was given, it prints out its content if the environment variable - * \ exists. - * - * Without the \ argument all current environment variables are printed. - */ -- cgit v1.2.3