From 728b075cb5e0df9c386f8377e0f6961e5ccc5143 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 16 Jun 2020 17:08:39 +0300 Subject: Add env script pseudo-builtin Also disable C++ recipe tests when cross-testing. --- doc/testscript.cli | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'doc/testscript.cli') diff --git a/doc/testscript.cli b/doc/testscript.cli index c0f0d4e..49725df 100644 --- a/doc/testscript.cli +++ b/doc/testscript.cli @@ -2426,6 +2426,34 @@ Write strings to \c{stdout} separating them with a single space and ending with a newline. +\h#builtins-env|\c{env}| + +\ +env [-u ]... [-] [=]... -- +\ + +Run a command adding/removing the variables to/from the environment. + +Note that \c{env} is a \i{pseudo-builtin}. In particular, its name and the +\c{--} separator must be specified \i{literally} on the command line. +Specifically, they must not be the result of an expansion. Also note that the +\c{--} separator must always be present. + +To avoid ambiguity, the variable assignments can be separated from the options +with the explicit \c{-} separator. In the example below the \c{--unset} +variable is added to the environment: + +\ +env - --unset=FOO -- $* +\ + +\dl| + +\li|\n\c{-u|--unset } + + Remove the specified variable from the environment.|| + + \h#builtins-exit|\c{exit}| \ @@ -2643,7 +2671,7 @@ is ECMAScript (more specifically, ECMA-262-based C++11 regular expressions). Edit \i{file} in place.| -\li|\n\c{-e|--expression