From ea42a4554351f4a695bf24f208ec0ad769f05e5c Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Wed, 2 Jan 2013 09:29:48 +0000 Subject: [PATCH 076/482] * docs/grub.texi (configfile): Explain environment variable handling. (source): New section. Reported by: Arbiel Perlacremaz. Fixes Savannah bug #35564. --- ChangeLog | 7 +++++++ docs/grub.texi | 18 +++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8723bfa..68920bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-01-02 Colin Watson + + * docs/grub.texi (configfile): Explain environment variable + handling. + (source): New section. + Reported by: Arbiel Perlacremaz. Fixes Savannah bug #35564. + 2012-12-31 Colin Watson Remove several trivially-unnecessary uses of nested functions. diff --git a/docs/grub.texi b/docs/grub.texi index 39d9614..e9af377 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -3303,6 +3303,7 @@ you forget a command, you can run the command @command{help} * search:: Search devices by file, label, or UUID * sendkey:: Emulate keystrokes * set:: Set an environment variable +* source:: Read a configuration file in same context * true:: Do nothing, successfully * unset:: Unset an environment variable * uppermem:: Set the upper memory size @@ -3429,7 +3430,9 @@ If they are completely identical, nothing will be printed. @deffn Command configfile file Load @var{file} as a configuration file. If @var{file} defines any menu -entries, then show a menu containing them immediately. +entries, then show a menu containing them immediately. Any environment +variable changes made by the commands in @var{file} will not be preserved +after @command{configfile} returns. @end deffn @@ -4069,6 +4072,19 @@ arguments, print all environment variables with their values. @end deffn +@node source +@subsection source + +@deffn Command source file +Read @var{file} as a configuration file, as if its contents had been +incorporated directly into the sourcing file. Unlike @command{configfile} +(@pxref{configfile}), this executes the contents of @var{file} without +changing context: any environment variable changes made by the commands in +@var{file} will be preserved after @command{source} returns, and the menu +will not be shown immediately. +@end deffn + + @node true @subsection true -- 1.8.2.1