Re: [PATCH 2/3] cli_hush.c: add "call" command

2020-09-26 Thread Wolfgang Denk
Dear Rasmus, In message you wrote: > On 25/09/2020 13.19, Rasmus Villemoes wrote: > > Currently, the only way to emulate functions with arguments in the > > busybox shell is by doing "foo=arg1; bar=arg2; run func" and having > > I have no idea why I always end up writing "busybox shell" when I me

Re: [PATCH 2/3] cli_hush.c: add "call" command

2020-09-25 Thread Rasmus Villemoes
On 25/09/2020 13.19, Rasmus Villemoes wrote: > Currently, the only way to emulate functions with arguments in the > busybox shell is by doing "foo=arg1; bar=arg2; run func" and having I have no idea why I always end up writing "busybox shell" when I mean "U-Boot shell". Sorry. I hope the meaning i

[PATCH 2/3] cli_hush.c: add "call" command

2020-09-25 Thread Rasmus Villemoes
Currently, the only way to emulate functions with arguments in the busybox 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"