summaryrefslogtreecommitdiffstats
path: root/commands/printenv.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/printenv.c')
-rw-r--r--commands/printenv.c30
1 files changed, 13 insertions, 17 deletions
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
+
+<p>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.</p>
+
+ */
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 [\<name>]
- *
- * Print environment variables.
- * If \<name> was given, it prints out its content if the environment variable
- * \<name> exists.
- *
- * Without the \<name> argument all current environment variables are printed.
- */