summary refs log tree commit diff
path: root/doc/stdenv.xml
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2016-05-07 13:10:09 +0200
committerProfpatsch <mail@profpatsch.de>2016-05-07 13:10:09 +0200
commitc6cfa7a4123587b6678daa74b387525a265c52e0 (patch)
tree779350f6ab70507835898b812ed0b1717add9b27 /doc/stdenv.xml
parentf2ec14284707578adb3c77063cb1e44d604dd5b7 (diff)
downloadnixlib-c6cfa7a4123587b6678daa74b387525a265c52e0.tar
nixlib-c6cfa7a4123587b6678daa74b387525a265c52e0.tar.gz
nixlib-c6cfa7a4123587b6678daa74b387525a265c52e0.tar.bz2
nixlib-c6cfa7a4123587b6678daa74b387525a265c52e0.tar.lz
nixlib-c6cfa7a4123587b6678daa74b387525a265c52e0.tar.xz
nixlib-c6cfa7a4123587b6678daa74b387525a265c52e0.tar.zst
nixlib-c6cfa7a4123587b6678daa74b387525a265c52e0.zip
manual/substituteAll: document filtered variables
Some variables are filtered out as of #14907.
Diffstat (limited to 'doc/stdenv.xml')
-rw-r--r--doc/stdenv.xml12
1 files changed, 11 insertions, 1 deletions
diff --git a/doc/stdenv.xml b/doc/stdenv.xml
index 136e83ee0cda..d5f37aee15ee 100644
--- a/doc/stdenv.xml
+++ b/doc/stdenv.xml
@@ -1169,7 +1169,17 @@ PATH=/nix/store/68afga4khv0w...-coreutils-6.12/bin
 echo @foo@
 </programlisting>
 
-    That is, no substitution is performed for undefined variables.</para></listitem>
+    That is, no substitution is performed for undefined variables.</para>
+
+    <para>Environment variables that start with an uppercase letter or an
+    underscore are filtered out,
+    to prevent global variables (like <literal>HOME</literal>) or private
+    variables (like <literal>__ETC_PROFILE_DONE</literal>) from accidentally
+    getting substituted.
+    The variables also have to be valid bash “names”, as
+    defined in the bash manpage (alphanumeric or <literal>_</literal>,
+    must not start with a number).</para>
+  </listitem>
   </varlistentry>