grub-devel
[Top][All Lists]
Advanced

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

Re: Scripting (IMPORTANT!)


From: tgingold
Subject: Re: Scripting (IMPORTANT!)
Date: Mon, 09 Oct 2006 14:52:23 +0200
User-agent: Internet Messaging Program (IMP) 3.2.5

Quoting Marco Gerards <address@hidden>:

Hi,

a few remarks:
[...]
> ============
> Menu entries
> ============
>
> Menu entries are added with `menuentry' (or its alias `@').  It's
> important to notice this is not a command.  Because it's part of the
> scripting syntax, it can have unique features.  A menuentry is like a
> function, especially because it can have arguments!
>
> Syntax: menuentry "Entry name" [arguments...] { body }
It would be nice to be able to add properties to a menuentry.  My first
idea is a logo property.
I think this could be done through a new command such as:
logo "Entry name" filename

> Make sure the entry name is properly escaped, otherwise spaces can not
> be included and will be seen as separator.  The arguments will become
> semi-variables like #1, #2, etc.  These can be used so one menuentry
> can be used as a template for a lot of menuentries.  This can best be
> explained with an example:
>
> (inside loop that sets i = 1...x)
> @ "Partition $i" $i { linux /vmlinuz root=/dev/hda#{1} }
Why not substituing variable at creation (unsubstitued one can be escaped) ?
Eg: @ "Partition $i" { linux /vmlinux root=/dev/hda$1 prefix=$$prefix }
Humm maybe too complex ?

Tristan.




reply via email to

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