[PATCH v2 2/3] allow positional arguments with "run" command

2020-10-07 Thread Rasmus Villemoes
Currently, the only way to emulate functions with arguments in the U-Boot shell is by doing "foo=arg1; bar=arg2; run func" and having "func" refer to $foo and $bar. That works, but is a bit clunky, and also suffers from foo and bar being set globally - if func itself wants to run other "functions"

Re: [PATCH v2 2/3] allow positional arguments with "run" command

2020-10-19 Thread Wolfgang Denk
Dear Rasmus, In message <2284dd1d-f20c-6246-805e-55454a581...@prevas.dk> you wrote: > > > Yes that's good, but is the plan now to take these patches rather than > > update to the latest hush? I was wondering is Buzybox has any tests > > for hush. > > Well, updating the whole hush code is not, as I

Re: [PATCH v2 2/3] allow positional arguments with "run" command

2020-10-19 Thread Rasmus Villemoes
On 19/10/2020 09.31, Wolfgang Denk wrote: > Dear Rasmus, > > In message <2284dd1d-f20c-6246-805e-55454a581...@prevas.dk> you wrote: >> >>> Yes that's good, but is the plan now to take these patches rather than >>> update to the latest hush? I was wondering is Buzybox has any tests >>> for hush. >>

Re: [PATCH v2 2/3] allow positional arguments with "run" command

2020-10-19 Thread Wolfgang Denk
Dear Rasmus, In message you wrote: > > > Yes, current versions of busybox hush do implement shell functions; > > tested under Fedora 32: > > Not what I meant, of course busybox hush does that. What I meant is that > it is not at all obvious how that support would actually benefit U-Boot. um... I

Re: [PATCH v2 2/3] allow positional arguments with "run" command

2020-10-11 Thread Simon Glass
On Wed, 7 Oct 2020 at 01:21, Rasmus Villemoes wrote: > > Currently, the only way to emulate functions with arguments in the > U-Boot shell is by doing "foo=arg1; bar=arg2; run func" and having > "func" refer to $foo and $bar. That works, but is a bit clunky, and > also suffers from foo and bar bei

Re: [PATCH v2 2/3] allow positional arguments with "run" command

2020-10-12 Thread Rasmus Villemoes
On 12/10/2020 05.34, Simon Glass wrote: > On Wed, 7 Oct 2020 at 01:21, Rasmus Villemoes > wrote: >> >> cmd/Kconfig| 10 ++ >> cmd/nvedit.c | 7 ++- >> common/cli.c | 44 ++-- >> common/cli_hush.c | 32 ++

Re: [PATCH v2 2/3] allow positional arguments with "run" command

2020-10-15 Thread Simon Glass
Hi Rasmus, On Mon, 12 Oct 2020 at 01:06, Rasmus Villemoes wrote: > > On 12/10/2020 05.34, Simon Glass wrote: > > On Wed, 7 Oct 2020 at 01:21, Rasmus Villemoes > > wrote: > >> > >> cmd/Kconfig| 10 ++ > >> cmd/nvedit.c | 7 ++- > >> common/cli.c | 44

Re: [PATCH v2 2/3] allow positional arguments with "run" command

2020-10-15 Thread Rasmus Villemoes
On 15/10/2020 17.05, Simon Glass wrote: > Hi Rasmus, > > On Mon, 12 Oct 2020 at 01:06, Rasmus Villemoes > wrote: >> >> On 12/10/2020 05.34, Simon Glass wrote: >>> On Wed, 7 Oct 2020 at 01:21, Rasmus Villemoes >>> wrote: cmd/Kconfig| 10 ++ cmd/nvedit.c | 7