cmd:Update HELP text of ’askenv’
PATCH 1/1 cmd:Update HELP text of ’askenv’
From: Adarsh Babu Kalepalli <[email protected]>
Help text of ‘askenv’ cmd is updated
---
cmd/nvedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/nvedit.c +1 -1
@@ -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
Signature · 1 line
2.17.1
Quoted 15 lines · On 6/1/21 9:09 AM, [email protected] wrote:
From: Adarsh Babu Kalepalli <[email protected]>
Help text of ‘askenv’ cmd is updated
Signed-off-by Adarsh Babu Kalepalli <[email protected]>---
cmd/nvedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)cmd/nvedit.c +0
-0
cmd/nvedit.c U_BOOT_CMD( · line 1572
Quoted 5 lines
cmd/nvedit.c +1
-1@@ -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
Quoted 4 lines
cmd/nvedit.c +0
-0);#endif
Hi Heinrich,
Quoted 4 lines
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.
Quoted 6 lines
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
Quoted 74 lines · Heinrich Schuchardt
Quoted 15 lines · On 6/1/21 9:09 AM, [email protected] wrote:
From: Adarsh Babu Kalepalli <[email protected]>
Help text of ‘askenv’ cmd is updated
Signed-off-by Adarsh Babu Kalepalli <[email protected]>---
cmd/nvedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)cmd/nvedit.c +0
-0cmd/nvedit.c U_BOOT_CMD( · line 1572
Quoted 4 lines
cmd/nvedit.c +0
-1@@ -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)"
cmd/nvedit.c U_BOOT_CMD( · line 1572
Quoted 1 line
cmd/nvedit.c +1
-0+ " - display 'message' and get environment variable 'name' fromstdin (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
Quoted 4 lines
cmd/nvedit.c +0
-0);#endif