Re: [PATCH 0/3] add "call" command

2020-09-30 Thread Wolfgang Denk
Dear Tom, In message <20200929174506.GJ14816@bill-the-cat> you wrote: > > One of my worries about updating our hush code would be to maintain > compatibility with all of the scripts out there that rely on whatever > odd behavior we have. Agreed. Unfortunately we never collected any list of wart

Re: [PATCH 0/3] add "call" command

2020-09-29 Thread Tom Rini
On Sat, Sep 26, 2020 at 04:02:08PM +0200, Wolfgang Denk wrote: > Dear Simon, > > In message > you > wrote: > > > > I would like to see this also. Is the busybox version the latest? > > There might even be some tests although I can't see any. > > I have never been able to locate any other origi

Re: [PATCH 0/3] add "call" command

2020-09-26 Thread Wolfgang Denk
Dear Heinrich, In message you wrote: > > > Nice idea! Only we should do a better syntax (options preceeding > > argument), i. e. > > > > run [ --args argv ] varname1 varname2 ... > > > > where argv would be the name of a variale to hold the arguments (as > > a comma (?) separated list) ? > I

Re: [PATCH 0/3] add "call" command

2020-09-26 Thread Wolfgang Denk
Dear Simon, In message you wrote: > > I would like to see this also. Is the busybox version the latest? > There might even be some tests although I can't see any. I have never been able to locate any other origin of the housh shell source code, so - exept for other ports - this is the only curr

Re: [PATCH 0/3] add "call" command

2020-09-26 Thread Heinrich Schuchardt
On 9/26/20 10:51 AM, Wolfgang Denk wrote: > Dear Heinrich, > > In message <99821acf-b921-2c06-05b8-dd32058f2...@gmx.de> you wrote: >> >> For me this could be realized by enhancing the run command to allow: >> >> run varname1 varname2 ... varnameN --args argv1 argv2 argv3 >> >> Arguments argv1, argv

Re: [PATCH 0/3] add "call" command

2020-09-26 Thread Wolfgang Denk
Dear Rasmus, In message <823e5d31-7022-346e-b3a3-e36a4a295...@prevas.dk> you wrote: > > Though I'd probably make it > > run varname -- arg1 arg2 arg3 Or rather run arg1 arg2 ... -- varname1 varname2 ... > instead: Just use -- as a separator [that has precedent as "stop doing > X, use

Re: [PATCH 0/3] add "call" command

2020-09-26 Thread Wolfgang Denk
Dear Heinrich, In message <99821acf-b921-2c06-05b8-dd32058f2...@gmx.de> you wrote: > > For me this could be realized by enhancing the run command to allow: > > run varname1 varname2 ... varnameN --args argv1 argv2 argv3 > > Arguments argv1, argv2, ... are passed to the script identified by the > l

Re: [PATCH 0/3] add "call" command

2020-09-25 Thread Simon Glass
Hi, On Fri, 25 Sep 2020 at 06:59, Wolfgang Denk wrote: > > Dear Rasmus, > > In message <20200925111942.4629-1-rasmus.villem...@prevas.dk> you wrote: > > This adds a way to call a "function" defined in the environment with > > arguments. I.e., whereas > > > > run foo > > > > requires one to set

Re: [PATCH 0/3] add "call" command

2020-09-25 Thread Rasmus Villemoes
On 25/09/2020 15.38, Heinrich Schuchardt wrote: > On 25.09.20 15:09, Wolfgang Denk wrote: >> Dear Heinrich Schuchardt, >> >> In message <4b00225d-d960-4a14-9aec-110f7...@gmx.de> you wrote: >>> >>> Further we cannot first introduce a command call and then eliminate it >>> due to backward compati

Re: [PATCH 0/3] add "call" command

2020-09-25 Thread Rasmus Villemoes
On 25/09/2020 15.09, Wolfgang Denk wrote: > Dear Heinrich Schuchardt, > > In message <4b00225d-d960-4a14-9aec-110f7...@gmx.de> you wrote: >> >> Further we cannot first introduce a command call and then eliminate it >> due to backward compatibility. We should decide on the final version >> befo

Re: [PATCH 0/3] add "call" command

2020-09-25 Thread Heinrich Schuchardt
On 25.09.20 15:09, Wolfgang Denk wrote: > Dear Heinrich Schuchardt, > > In message <4b00225d-d960-4a14-9aec-110f7...@gmx.de> you wrote: >> >> Further we cannot first introduce a command call and then eliminate it >> due to backward compatibility. We should decide on the final version >> beforeh

Re: [PATCH 0/3] add "call" command

2020-09-25 Thread Wolfgang Denk
Dear Heinrich Schuchardt, In message <4b00225d-d960-4a14-9aec-110f7...@gmx.de> you wrote: > > Further we cannot first introduce a command call and then eliminate it > due to backward compatibility. We should decide on the final version > beforehand. Full agreement. we need a concept of what

Re: [PATCH 0/3] add "call" command

2020-09-25 Thread Wolfgang Denk
Dear Rasmus, In message <20200925111942.4629-1-rasmus.villem...@prevas.dk> you wrote: > This adds a way to call a "function" defined in the environment with > arguments. I.e., whereas > > run foo > > requires one to set the (shell or environment) variables referenced > from foo beforehand, with

Re: [PATCH 0/3] add "call" command

2020-09-25 Thread Rasmus Villemoes
On 25/09/2020 13.52, Heinrich Schuchardt wrote: > On 25.09.20 13:19, Rasmus Villemoes wrote: >> This adds a way to call a "function" defined in the environment with >> arguments. I.e., whereas >> >> run foo >> >> requires one to set the (shell or environment) variables referenced >> from foo befo

Re: [PATCH 0/3] add "call" command

2020-09-25 Thread Heinrich Schuchardt
On 25.09.20 13:19, Rasmus Villemoes wrote: > This adds a way to call a "function" defined in the environment with > arguments. I.e., whereas > > run foo > > requires one to set the (shell or environment) variables referenced > from foo beforehand, with this one can instead do > > call foo arg1

[PATCH 0/3] add "call" command

2020-09-25 Thread Rasmus Villemoes
This adds a way to call a "function" defined in the environment with arguments. I.e., whereas run foo requires one to set the (shell or environment) variables referenced from foo beforehand, with this one can instead do call foo arg1 arg2 arg3 and use $1... up to $9 in the definition of foo