From f021f61f10c566fcae2f77b1a4b095869076062b Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 30 Dec 2020 23:06:31 +0000 Subject: Add -E option for variable autoimport --- doc/backtick.html | 14 ++--- doc/forbacktickx.html | 7 ++- doc/forstdin.html | 7 ++- doc/forx.html | 7 ++- doc/getcwd.html | 12 +++- doc/getpid.html | 12 +++- doc/withstdinas.html | 7 ++- package/deps.mak | 24 ++++---- src/execline/backtick.c | 82 ++++++++++--------------- src/execline/deps-exe/getcwd | 1 + src/execline/deps-exe/getpid | 1 + src/execline/deps-exe/withstdinas | 1 + src/execline/forbacktickx.c | 11 ++-- src/execline/forstdin.c | 114 ++++++++++++++++------------------- src/execline/forx.c | 39 ++++-------- src/execline/getcwd.c | 36 ++++++++--- src/execline/getpid.c | 38 ++++++++---- src/execline/withstdinas.c | 59 ++++++++---------- src/include/execline/execline.h | 7 +++ src/libexecline/deps-lib/execline | 2 + src/libexecline/el_modif_and_exec.c | 36 +++++++++++ src/libexecline/el_modif_and_spawn.c | 39 ++++++++++++ src/libexecline/el_spawn0.c | 1 + 23 files changed, 333 insertions(+), 224 deletions(-) create mode 100644 src/libexecline/el_modif_and_exec.c create mode 100644 src/libexecline/el_modif_and_spawn.c diff --git a/doc/backtick.html b/doc/backtick.html index 1f77432..91e963a 100644 --- a/doc/backtick.html +++ b/doc/backtick.html @@ -30,7 +30,7 @@ environment variable, then executes another program.

-     backtick [ -i | -I | -D default ] [ -N | -n ] variable { prog1... } prog2...
+     backtick [ -i | -I | -D default ] [ -N | -n ] [ -E | -e ] variable { prog1... } prog2...
 
-

Notes

- - - diff --git a/doc/forbacktickx.html b/doc/forbacktickx.html index d28ad0b..cbf33b5 100644 --- a/doc/forbacktickx.html +++ b/doc/forbacktickx.html @@ -30,7 +30,7 @@ run another program.

-     forbacktickx [ -p | -o okcodes | -x breakcodes ] [ -N | -n ] [ -C | -c ] [ -0 | -d delim ] variable { gen... } loop...
+     forbacktickx [ -E | -e ] [ -p | -o okcodes | -x breakcodes ] [ -N | -n ] [ -C | -c ] [ -0 | -d delim ] variable { gen... } loop...
 

diff --git a/doc/forstdin.html b/doc/forstdin.html index 74644b4..3b00d7d 100644 --- a/doc/forstdin.html +++ b/doc/forstdin.html @@ -30,7 +30,7 @@ run another program.

-     forstdin [ -p | -o okcodes | -x breakcodes ] [ -N | -n ] [ -C | -c ] [ -0 | -d delim ] variable loop...
+     forstdin [ -E | -e ] [ -p | -o okcodes | -x breakcodes ] [ -N | -n ] [ -C | -c ] [ -0 | -d delim ] variable loop...
 

diff --git a/doc/forx.html b/doc/forx.html index 1c2a61c..8f1d558 100644 --- a/doc/forx.html +++ b/doc/forx.html @@ -29,7 +29,7 @@

-     forx [ -p ] [ -o okcodes | -x breakcodes ] variable { args... } loop...
+     forx [ -E | -e ] [ -p ] [ -o okcodes | -x breakcodes ] variable { args... } loop...
 

Notes

diff --git a/doc/getcwd.html b/doc/getcwd.html index 9735630..d3e7e27 100644 --- a/doc/getcwd.html +++ b/doc/getcwd.html @@ -27,7 +27,7 @@ then executes a program.

Interface

-     getcwd var prog...
+     getcwd [ -E | -e ] var prog...
 

@@ -37,6 +37,16 @@ into the var variable, then execs into prog with its arguments.

+

Options

+ + +

Notes