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@ - That is, no substitution is performed for undefined variables. + That is, no substitution is performed for undefined variables. + + Environment variables that start with an uppercase letter or an + underscore are filtered out, + to prevent global variables (like HOME) or private + variables (like __ETC_PROFILE_DONE) from accidentally + getting substituted. + The variables also have to be valid bash “names”, as + defined in the bash manpage (alphanumeric or _, + must not start with a number). +