diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2019-06-03 13:17:13 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2019-06-03 13:41:34 +0300 |
commit | f50a208f9df348cede2ba50b4f435351d8d3f19e (patch) | |
tree | c596fdf237b17713ab56c0269cdb1d339e306941 /NEWS | |
parent | 8004bbaa1b31b14dd4c4d3886b5f57b103bf7405 (diff) | |
download | pies-f50a208f9df348cede2ba50b4f435351d8d3f19e.tar.gz pies-f50a208f9df348cede2ba50b4f435351d8d3f19e.tar.bz2 |
Finish the env re-implementation
* NEWS: Document the "env" statement and the PIES_MASTER_PID
environment variable.
Version 1.3.91
* configure.ac: 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/env.at: Check the legacy env syntax.
* tests/envop.at: Additional checks.
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 46 |
1 files changed, 43 insertions, 3 deletions
@@ -1,2 +1,2 @@ -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. @@ -6,3 +6,3 @@ Please send Pies bug reports to <bug-pies@gnu.org> or -Version 1.3.90 (git) +Version 1.3.91 (git) @@ -40,3 +40,37 @@ contains redirections, pipes, etc. E.g. -* 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. + +Example: + + 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. @@ -49,2 +83,8 @@ X to have the value "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 +PIES_MASTER_PID. + |