Currently, the commands default, timeout, etc. are ad-hoc, because they can be 
usual variables, but they are commands only for the menu context. I think the 
right way is to make a context for variables (and maybe for funcions as 
well).

This can be implemented differently, that is, using handlers. Handlers can 
change the behavior of each variable arbitrarily. But I'm afraid that this is 
sometimes confusing, and could be a burden, if we want to define more 
menu-specific variables. For instance, I'm considering using variables to 
define a "theme" of the menu interface. This would require a lot of 
variables. If we use handlers, we would have so many special variables... 
IMO, handlers are exceptions, and less exceptions are better to understand 
the system.

So I'd like to make variables more similar to BASH's semantics; by default, 
all variables should be local, and become global only when the user executes 
"export". Then, a reference of a variable means that GRUB first search the 
variable in the current context, then in the global context. This looks 
cleaner than the current implementation.

Okuji


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to