10.02.2016 21:15, Arbiel (gmx) пишет:
> If "new context" means "new displayed menu", what happens then when
> escaping a submenu to return to the previously displayed menu ? Do you
> have, in the submenu, to export back the variables ?
> 

As I already said

> Variables created in new context are lost when
> context is destroyed (e.g. you exit submenu).

May be I should have used "variables *set*".

There is no way to propagate variables back to previous context.

> Le 10/02/2016 17:56, Andrei Borzenkov a écrit :
>> 10.02.2016 14:34, Arbiel (gmx) пишет:
>>> Hi
>>>
>>> Is it necessary to export a variable, set in the configuration file, to
>>> be able to use it in a menuentry ?
>> No, if it is set in the same variable context.
>>
>>> Does it matter whether the menuentry
>>> is embedded or not in a submenu function ?
>>>
>> Yes. Submenu runs in new variable context. Each context has completely
>> separate set of variables. When new context is created, exported
>> variables are copied in new context. Without any exports new context
>> would start empty. Variables created in new context are lost when
>> context is destroyed (e.g. you exit submenu).
>>
>> I do not know what was the rationale for this. Personally I find it
>> rather confusing.
>>
>> I have in mind documenting but cannot decide in which part of manual it
>> fits :)
>>
> 
> 


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Help-grub mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-grub

Reply via email to