Skip to content

add "call" command

Wolfgang Denk u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 3 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 3 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] add "call" command

Dear Heinrich,

Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 8 lines

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

In another mail you suggested "run arg1 arg2 ... -- varname1 varname2".

I was commenting on another suggestion.

Quoted 3 lines

Whether arguments or script names are first or last does not make much of a difference for the implementation effort. Any way you have to loop over all arguments to find the separator "--".

It does not make a differenc in terms of implementation, but tradition in UNIX systems is to have

command_name [ -options ... ] arguments

i. e. options always came first.

It is only later tools that ignored how a proper program (TM) should behave ;-)

Quoted 3 lines

"better syntax" does not apply here as the two alternatives have the same expressivity, and need the same amount of typing and learning. It is a matter of taste.

Indeed. One is more pretty, and the other one is more ugly ;-)

Quoted 5 lines
Quoted 2 lines

Do you have an idea how the "script" would pull out the arguments from that variable?

Rasmus already suggested $1 .. $9 for the positional arguments (where counting should not stop at 9).

Fine with me.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The universe does not have laws - it has habits, and  habits  can  be
broken.