[PATCH v8 4/8] env: Allow U-Boot scripts to be placed in a .env file

Wolfgang Denk wd at denx.de
Tue Oct 19 18:20:30 CEST 2021


Dear Simon,

In message <CAPnjgZ1p6ueRhDsgBZGMXFhgv7UhRFA1UfvoHGGd0-136oTgvA at mail.gmail.com> you wrote:
>
> But how do we handle this?
>
> var+=fred
>
> Is this appending to var or assigning to var+  ?

It is assigning to "var+".
>
> var++=fred
>
> is unambiguous but very confusing. I think it would be better to disallow +

It's neither unambiguous nor confusing.  It is assigning to "var++".


I think we should not change what is old and might be in use.

It is much easier to change what is new and can be defined at will.

If we define for example that "<name>=+<value>" appends, then we can
also define our own escape rules, for example:

	var=fred	assigns
	var=+fred	appends "fred"
	var=\+fred	assignes the value "+fred"
	var=++fred	appends "+fred"

Best regards,

Wolfgang Denk

-- 
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
Monday is an awful way to spend one seventh of your life.


More information about the U-Boot mailing list