All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cmd:Update HELP text of ’askenv’
@ 2021-06-01  7:09 opensource.kab
  2021-06-01 16:41 ` Heinrich Schuchardt
  0 siblings, 1 reply; 3+ messages in thread
From: opensource.kab @ 2021-06-01  7:09 UTC (permalink / raw)
  To: u-boot
  Cc: sjg, Adarsh Babu Kalepalli, Heinrich Schuchardt, Maxim Uvarov,
	Patrice Chotard, Patrick Delaunay, Pedro Aguilar

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
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] cmd:Update HELP text of ’askenv’
  2021-06-01  7:09 [PATCH] cmd:Update HELP text of ’askenv’ opensource.kab
@ 2021-06-01 16:41 ` Heinrich Schuchardt
  2021-06-01 17:46   ` Adarsh Babu Kalepalli
  0 siblings, 1 reply; 3+ messages in thread
From: Heinrich Schuchardt @ 2021-06-01 16:41 UTC (permalink / raw)
  To: opensource.kab
  Cc: sjg, Maxim Uvarov, Patrice Chotard, Patrick Delaunay,
	Pedro Aguilar, u-boot, Tom Rini

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
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] cmd:Update HELP text of ’askenv’
  2021-06-01 16:41 ` Heinrich Schuchardt
@ 2021-06-01 17:46   ` Adarsh Babu Kalepalli
  0 siblings, 0 replies; 3+ messages in thread
From: Adarsh Babu Kalepalli @ 2021-06-01 17:46 UTC (permalink / raw)
  To: Heinrich Schuchardt
  Cc: Simon Glass, Maxim Uvarov, Patrice Chotard, Patrick Delaunay,
	Pedro Aguilar, u-boot, Tom Rini

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
> >
> >
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-01 17:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01  7:09 [PATCH] cmd:Update HELP text of ’askenv’ opensource.kab
2021-06-01 16:41 ` Heinrich Schuchardt
2021-06-01 17:46   ` Adarsh Babu Kalepalli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.