diff --git a/Global.cpp b/Global.cpp index e269378..be623fd 100644 --- a/Global.cpp +++ b/Global.cpp @@ -2,6 +2,7 @@ #include "Exception.h" #include "__mysql.h" #include +#include namespace jet { @@ -45,6 +46,8 @@ namespace jet { // TODO: should only allow CGI variable name. Allow variable substitution. } if(variable.ifNext("@")) { // TODO: should only allow environment variables. Allow substitution. + } if(variable.ifNext("$")) { + return getenv(renderVariableName(name, variable).c_str()); } else { coreutils::MString splitName = renderVariableName(name, variable); splitName.split("."); diff --git a/jet-2.0 b/jet-2.0 index fa7a3d7..8ce0e9b 100755 Binary files a/jet-2.0 and b/jet-2.0 differ diff --git a/testjet.jet b/testjet.jet index 7ec6322..f08ece1 100755 --- a/testjet.jet +++ b/testjet.jet @@ -4,13 +4,13 @@ This is a comment and should not show up in the output. $[nonexistant] + $[$HOME] - + select * from testdata $[1.id] $[1.text] $[1.value] -