diff options
author | Holger Schurig <holgerschurig@gmail.com> | 2014-05-13 10:28:53 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-05-14 10:03:48 +0200 |
commit | 26a34100e88b707db00f0b66361f344177cdf4ff (patch) | |
tree | a2697e4300c94e39d43d8a80cf00a0332a83e254 /commands/Kconfig | |
parent | 6e3a969106fc84413f6ccef34fb78c0f8f9dd6ba (diff) | |
download | barebox-26a34100e88b707db00f0b66361f344177cdf4ff.tar.gz barebox-26a34100e88b707db00f0b66361f344177cdf4ff.tar.xz |
commands: HUSH_GETOPT -> CMD_GETOPT
* this compile option actually turns on a command, so name it
accordingly
* also move the Kconfig definition into commands/Kconfig, thus
placing getopt into the "Shell scripting commands" section
* while at it, improve Kconfig documention
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/Kconfig')
-rw-r--r-- | commands/Kconfig | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/commands/Kconfig b/commands/Kconfig index 65bc2f64ec..2339f4e3a9 100644 --- a/commands/Kconfig +++ b/commands/Kconfig @@ -942,6 +942,21 @@ config CMD_FALSE help Do nothing, unsuccessfully +config CMD_GETOPT + bool + depends on SHELL_HUSH + prompt "getopt" + help + Parse option arguments + + Usage: getopt OPTSTRING VAR + + OPTSTRING contains the option letters. Add a colon to an + options if this Option has a required argument or two colons + for an optional argument. The Current option is saved in + VAR, arguments are saved in $OPTARG. Any n-option arguments + can be accessed starting from $1. + config CMD_LET tristate prompt "let" |