path: root/NEWS
authorSergey Poznyakoff <>2019-06-03 10:17:13 (GMT)
committer Sergey Poznyakoff <>2019-06-03 10:41:34 (GMT)
commitf50a208f9df348cede2ba50b4f435351d8d3f19e (patch) (side-by-side diff)
treec596fdf237b17713ab56c0269cdb1d339e306941 /NEWS
parent8004bbaa1b31b14dd4c4d3886b5f57b103bf7405 (diff)
Finish the env re-implementation
* NEWS: Document the "env" statement and the PIES_MASTER_PID environment variable. Version 1.3.91 * Version 1.3.91 * doc/pies.texi: Document the new "env" statement syntax. Provide instructions on how to convert legacy "env" statement to the new form. * lib/envop.c (environ_unset): Take reference value as argument. If supplied, unset the variable only if its value matches the reference one. * lib/envop.h (environ_unset): Change proto. * src/pies.c (parse_legacy_env): Minor changes. (_cb_env_unset): Allow to specify value. * src/progman.c (run_command): Define PIES_MASTER_PID. * tests/ Check the legacy env syntax. * tests/ Additional checks.
Diffstat (limited to 'NEWS') (more/less context) (ignore whitespace changes)
1 files changed, 43 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index f34a6f0..db79097 100644
--- a/NEWS
+++ b/NEWS
@@ -1,10 +1,10 @@
-GNU Pies NEWS -- history of user-visible changes. 2019-05-31
+GNU Pies NEWS -- history of user-visible changes. 2019-06-03
See the end of file for copying conditions.
Please send Pies bug reports to <> or
-Version 1.3.90 (git)
+Version 1.3.91 (git)
* New option --no-init
@@ -38,7 +38,41 @@ contains redirections, pipes, etc. E.g.
* Improved cyclic dependency diagnostics
-* Fix a bug in 'env' statement
+* New 'env' statement
+The 'env' statement has been re-implemented as a compound statement.
+It can contain the following sub-statements:
+** clear yes
+Clears the environment
+** keep NAME
+Keeps the variable NAME when clearing the environment. Implies
+"clear yes". NAME can be a globbing pattern, in which case all
+variables matching the pattern are retained.
+** set "NAME=VALUE"
+Sets the environment variable for the component. VALUE is subject
+to variable expansion.
+** unset NAME
+Unsets the variable. NAME can be a globbing pattern, in which case all
+variables matching the pattern are unset.
+ env {
+ clear yes
+ keep PATH
+ keep MANPATH
+ keep "LC_*"
+ set "MANPATH=$MANPATH${MANPATH:+:}/usr/local/man"
+ }
+* Legacy 'env' statement.
+Support for the old one-line syntax of "env" is retained for
+backward compatibility.
Previous versions applied unnecessary word splitting if given a
single argument. This is now fixed, so that e.g. the following
@@ -47,6 +81,12 @@ X to have the value "foo bar":
env "X=foo bar"
+* New environment variable available in commands started from return-code
+Programs started via "exec" statement in the "return-code" block
+obtain the PID of the master pies process in environment variable
Version 1.3, 2016-10-01

Return to:

Send suggestions and report system problems to the System administrator.