help-grub
[Top][All Lists]
Advanced

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

Re: Exporting a variable to use it in a submenu or menuentry function ?


From: Arbiel (gmx)
Subject: Re: Exporting a variable to use it in a submenu or menuentry function ?
Date: Wed, 10 Feb 2016 19:15:17 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

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 ?

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


reply via email to

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