All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: submenu fails to see variables
Date: Mon, 6 Sep 2021 15:39:50 +0200	[thread overview]
Message-ID: <CAEaD8JPOEeAkrpWZAG-VyaaqXAbX3ca4L1pQeJiEc4wiZ2XWcw@mail.gmail.com> (raw)
In-Reply-To: <20210906124637.48eb8af5.olaf@aepfle.de>

[-- Attachment #1: Type: text/plain, Size: 659 bytes --]

Le lun. 6 sept. 2021 à 12:49, Olaf Hering <olaf@aepfle.de> a écrit :

> For some reason global variables are not seen in a submenu {} section.
> Does anyone happen to know why this behavior is useful?
>
You need to export variable to make it visible in submenu

>
> Pseudocode:
>
> set var=val
> menuentry "me" {
>  set
>  echo "var ${var}"
>  sleep 3
> }
>
> submenu "sm" {
>  set
>  echo "var ${var}"
>  sleep 3
> }
>
> Seen with grub 2.02 and 2.04.
>
>
> Thanks,
> Olaf
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>

[-- Attachment #2: Type: text/html, Size: 1398 bytes --]

  reply	other threads:[~2021-09-06 13:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-06 10:46 submenu fails to see variables Olaf Hering
2021-09-06 13:39 ` Vladimir 'phcoder' Serbinenko [this message]
2021-09-07  9:30   ` Olaf Hering
2021-09-07 10:54     ` Dimitri John Ledkov
2021-09-08 19:24       ` Daniel Kiper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEaD8JPOEeAkrpWZAG-VyaaqXAbX3ca4L1pQeJiEc4wiZ2XWcw@mail.gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.