From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerlando Falauto Date: Thu, 29 Sep 2011 08:13:09 +0200 Subject: [U-Boot] [PATCH 1/2] env: set individual variables to default In-Reply-To: <20110928210809.79CA6140799B@gemini.denx.de> References: <1316703972-8417-1-git-send-email-gerlando.falauto@keymile.com> <1316703972-8417-2-git-send-email-gerlando.falauto@keymile.com> <20110922195134.543F21407979@gemini.denx.de> <4E7C35E6.5030808@keymile.com> <20110923095545.337E6140797A@gemini.denx.de> <4E82E6CA.9030802@keymile.com> <20110928210809.79CA6140799B@gemini.denx.de> Message-ID: <4E840C75.7080905@keymile.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 09/28/2011 11:08 PM, Wolfgang Denk wrote: > Dear Gerlando Falauto, > > In message<4E82E6CA.9030802@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