[U-Boot] [PATCH 1/2] env: set individual variables to default
Gerlando Falauto
gerlando.falauto at keymile.com
Thu Sep 29 08:13:09 CEST 2011
On 09/28/2011 11:08 PM, Wolfgang Denk wrote:
> Dear Gerlando Falauto,
>
> In message<4E82E6CA.9030802 at keymile.com> you wrote:
>>
>>> env import -n name[,..] [other_flags] addr [size]
>>>
>>> ?
>>
>> Uhm, wouldn't that make the syntax completely unrelated to all other
>> commands, leading to confusion?
>>
>> How about something like:
>>
>> env import [-f] [flags] addr [size] [-n name[ ...]]
>> env default [-f] -a|-n name[ ...]
>> env set [-f] name [val ...]
>
> No. That's even worse.
You mean that options should always precede the main argument?
> If you don't like the comma separation,we
> could as well accept multiple -n args:
>
> env import -n name [-n name1 ... ] [other_flags] addr [size]
It's not that I don't like comma separation. It's just that maybe the
syntax should be consistent between commands... that's all.
But since it's a very unusual (and possibly unused) command, I am
probably worrying too much.
>> Where:
>> -a in "env default" would be the way to prevent the inadverent user
>> from wrecking the environment by mistake.
>
> What does -a stand for? "all" ?
Yes. Any comments on this?
How should we implement "env default" for the whole env?
1) "env default"
2) "env deafult -a"
3) "env default all"
>> Slightly off-topic: how about variables starting with "-"?
>
> Should be no problem in general, except for the pathological cases
> like variable names "-f" etc. But there has to be a penalty for such
> stupid names :-)
I can't think of any shell or programming language allowing for
variables starting with "-" or digits...
Thasnks,
Gerlando Falauto
More information about the U-Boot
mailing list