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