[PATCH] cmd:Update HELP text of ’askenv’

From: Adarsh Babu Kalepalli opensource.kab@gmail.com
Help text of ‘askenv’ cmd is updated
Signed-off-by: Adarsh Babu Kalepalli opensource.kab@gmail.com ---
cmd/nvedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/nvedit.c b/cmd/nvedit.c index d14ba10cef..910cf16aaf 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -1569,7 +1569,7 @@ U_BOOT_CMD( askenv, CONFIG_SYS_MAXARGS, 1, do_env_ask, "get environment variables from stdin", "name [message] [size]\n" - " - get environment variable 'name' from stdin (max 'size' chars)" + " - display 'message' and get environment variable 'name' from stdin (max 'size' chars)" ); #endif

On 6/1/21 9:09 AM, opensource.kab@gmail.com wrote:
From: Adarsh Babu Kalepalli opensource.kab@gmail.com
Help text of ‘askenv’ cmd is updated
Signed-off-by: Adarsh Babu Kalepalli opensource.kab@gmail.com
cmd/nvedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/nvedit.c b/cmd/nvedit.c index d14ba10cef..910cf16aaf 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -1569,7 +1569,7 @@ U_BOOT_CMD( askenv, CONFIG_SYS_MAXARGS, 1, do_env_ask, "get environment variables from stdin", "name [message] [size]\n"
- " - get environment variable 'name' from stdin (max 'size' chars)"
- " - display 'message' and get environment variable 'name' from stdin (max 'size' chars)"
Hello Ardash,
thanks for looking for a better description.
This online help does not correctly describe the command syntax yet which is:
askenv name [message ...] [size]
=> askenv foo Please enter 'foo': abcdefgh => echo $foo abcdefgh =>
=> askenv foo 4 Please enter 'foo': abcdefgh => echo $foo abcd =>
=> askenv foo msg1 msg2 msg3 3 msg1 msg2 msg3 abcdefgh => echo $foo abc =>
=> askenv foo msg1 msg2 msg3 msg1 msg2 msg3 abcdefgh => echo $foo abcdefgh =>
The logic needs some explanation. The last parameter is used as size if it can be converted to a decimal number. In most other commands we expect a hexadecimal number.
We started adding man-pages for all commands to doc/usage/. Do you want to give it a try?
Best regards
Heinrich
); #endif

Hi Heinrich,
thanks for looking for a better description.
This online help does not correctly describe the command syntax yet which is:
Was trying to keep the command HELP text(on the shell ) simple and mention the available parameters.
The logic needs some explanation. The last parameter is used as size if it can be converted to a decimal number. In most other commands we expect a hexadecimal number.
We started adding man-pages for all commands to doc/usage/. Do you want to give it a try?
Sure.
I am trying to review the HELP text of the shell commands and improve them (if need be). In this process, do you recommend following any specific approach ??
Regards, Adarsh
On Tue, 1 Jun 2021 at 22:12, Heinrich Schuchardt xypron.glpk@gmx.de wrote:
On 6/1/21 9:09 AM, opensource.kab@gmail.com wrote:
From: Adarsh Babu Kalepalli opensource.kab@gmail.com
Help text of ‘askenv’ cmd is updated
Signed-off-by: Adarsh Babu Kalepalli opensource.kab@gmail.com
cmd/nvedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/nvedit.c b/cmd/nvedit.c index d14ba10cef..910cf16aaf 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -1569,7 +1569,7 @@ U_BOOT_CMD( askenv, CONFIG_SYS_MAXARGS, 1, do_env_ask, "get environment variables from stdin", "name [message] [size]\n"
" - get environment variable 'name' from stdin (max 'size'
chars)"
" - display 'message' and get environment variable 'name' from
stdin (max 'size' chars)"
Hello Ardash,
thanks for looking for a better description.
This online help does not correctly describe the command syntax yet which is:
askenv name [message ...] [size]
=> askenv foo Please enter 'foo': abcdefgh => echo $foo abcdefgh =>
=> askenv foo 4 Please enter 'foo': abcdefgh => echo $foo abcd =>
=> askenv foo msg1 msg2 msg3 3 msg1 msg2 msg3 abcdefgh => echo $foo abc =>
=> askenv foo msg1 msg2 msg3 msg1 msg2 msg3 abcdefgh => echo $foo abcdefgh =>
The logic needs some explanation. The last parameter is used as size if it can be converted to a decimal number. In most other commands we expect a hexadecimal number.
We started adding man-pages for all commands to doc/usage/. Do you want to give it a try?
Best regards
Heinrich
); #endif
participants (3)
-
Adarsh Babu Kalepalli
-
Heinrich Schuchardt
-
opensource.kab@gmail.com