grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] Redesign of the menu system


From: Michal Suchanek
Subject: Re: [RFC] Redesign of the menu system
Date: Wed, 19 Aug 2009 12:34:43 +0200

2009/8/19 Vladimir 'phcoder' Serbinenko <address@hidden>:
>>> To have level or tree-like model you can use '.' as a name separator
>>> it will make the system uniform with current FreeBSD booting.
>>
>> XML/CSS is not the easiest format to work with but a bunch of
>> variables which represent a tree is not nice either.
>>
>> However, apt has settings format that allows to specify variables both
>> separately and as trees (using {} nested blocks).
>>
> Do you mean sth like
> set root {
>  branch {
>     value = key;
>  }
> }
> ?
> This would effectively promote 'set' to a keyword of grub-sh scripting
> language but I'm ok with this.

Yes, something like that.

I am not sure how the configuration parser currently works and what
are the implications of adding this syntax.

But having a shorthand

set root.branch {
 value1=key1;
 value2=key2;
 value3=key3;
}

for

set root.branch.value1=key1;
set root.branch.value2=key2;
set root.branch.value3=key3;

is good for several reasons. At the very least it reduces typing,
enhances readability somewhat, and allows for more modular
construction of multilevel menus or such.

apt uses :: for separator (not .) and any :: can be replaced with {
and has to be closed with } then.

Thanks

Michal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]