aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2025-03-26 04:27:39 +0000
committerLaurent Bercot <ska@appnovation.com>2025-03-26 04:27:39 +0000
commitea714e771e8964114285915acacf80707cc17bdd (patch)
tree05e036cd629693de1667225cd8df4bf26aa5db10 /doc
parent7390d0eacf18f70a3ac4f6f3351cadc12656234e (diff)
downloadexecline-ea714e771e8964114285915acacf80707cc17bdd.tar.gz
Add export-array; update deps
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/export-array.html64
-rw-r--r--doc/index.html5
-rw-r--r--doc/upgrade.html4
3 files changed, 71 insertions, 2 deletions
diff --git a/doc/export-array.html b/doc/export-array.html
new file mode 100644
index 0000000..bc3d611
--- /dev/null
+++ b/doc/export-array.html
@@ -0,0 +1,64 @@
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta http-equiv="Content-Language" content="en" />
+ <title>execline: the export program</title>
+ <meta name="Description" content="execline: the export program" />
+ <meta name="Keywords" content="execline command export environment variable" />
+ <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
+ </head>
+<body>
+
+<p>
+<a href="index.html">execline</a><br />
+<a href="//skarnet.org/software/">Software</a><br />
+<a href="//skarnet.org/">skarnet.org</a>
+</p>
+
+<h1> The <tt>export-array</tt> program </h1>
+
+<p>
+<tt>export-array</tt> encodes a set of values into an environment variable,
+then executes a program.
+</p>
+
+<h2> Interface </h2>
+
+<p>
+ In an execline script:
+</p>
+
+<pre>
+ export-array [ -d <em>delim</em> ] <em>var</em> { <em>value1</em> <em>value2</em> ... } <em>prog...</em>
+</pre>
+
+<ul>
+ <li> <tt>export-array</tt> reads a (possibly empty) <a href="el_semicolon.html">block</a>
+of values, and encodes them into the <em>var</em> environment variable.
+ <li> It then execs into <em>prog</em>. </li>
+</ul>
+
+<h2> Options </h2>
+
+<ul>
+ <li> <tt>-d</tt>&nbsp;<em>delim</em>&nbsp;: encode the list of values using the
+first character of <em>delim</em> as a terminator. Only use this when you know
+the character does not appear in any of the values! By default, no terminator
+character is specified, and the values are encoded as netstrings. </li>
+</ul>
+
+<h2> Notes </h2>
+
+<ul>
+ <li> <em>var</em> must be given without a dollar! </li>
+ <li> <em>var</em> must not contain the character <tt>=</tt> . </li>
+ <li> A list of values encoded via <code>export-array <em>VAR</em> { <em>value1</em> <em>value2</em> ... }</code>
+can be retrieved via <code><a href="importas.html">importas</a> -Ssd "" <em>VAR</em></code>.
+Then <tt>${VAR}</tt> will be split into as many words as there are values. </li>
+ <li> A list encoded via <code>export-array -d <em>delim</em> <em>VAR</em> { <em>value1</em> <em>value2</em> ... }</code>
+can similarly be retrieved via <code>importas -Ssd <em>delim</em> <em>VAR</em></code>. </li>
+</ul>
+
+</body>
+</html>
diff --git a/doc/index.html b/doc/index.html
index 6dbab1c..324f259 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -51,7 +51,7 @@ shell's syntax, and has no security issues.
<li> A POSIX-compliant system with a standard C development environment </li>
<li> GNU make, version 3.81 or later. </li>
<li> <a href="//skarnet.org/software/skalibs/">skalibs</a> version
-2.14.3.0 or later. It's a build-time requirement. It's also a run-time
+2.14.4.0 or later. It's a build-time requirement. It's also a run-time
requirement if you link against the shared version of the skalibs
library. </li>
</ul>
@@ -64,7 +64,7 @@ library. </li>
<li> If you're using <a href="https://musl.libc.org/">musl</a> and
want nsswitch-like functionality:
<a href="//skarnet.org/software/nsss/">nsss</a> version
-0.2.0.5 or later (build-time and boot-time) </li>
+0.2.0.6 or later (build-time and boot-time) </li>
</ul>
<h3> Licensing </h3>
@@ -131,6 +131,7 @@ the previous versions of execline and the current one. </li>
<li><a href="emptyenv.html">The <tt>emptyenv</tt> program</a></li>
<li><a href="envfile.html">The <tt>envfile</tt> program</a></li>
<li><a href="export.html">The <tt>export</tt> program</a></li>
+<li><a href="export-array.html">The <tt>export-array</tt> program</a></li>
<li><a href="unexport.html">The <tt>unexport</tt> program</a></li>
<li><a href="fdclose.html">The <tt>fdclose</tt> program</a></li>
<li><a href="fdblock.html">The <tt>fdblock</tt> program</a></li>
diff --git a/doc/upgrade.html b/doc/upgrade.html
index 31ddf00..9060ea4 100644
--- a/doc/upgrade.html
+++ b/doc/upgrade.html
@@ -21,6 +21,10 @@
<h2> in 2.9.7.0 </h2>
<ul>
+ <li> <a href="//skarnet.org/software/skalibs/">skalibs</a>
+dependency bumped to 2.14.4.0. </li>
+ <li> <a href="//skarnet.org/software/nsss/">nsss</a>
+optional dependency bumped to 0.2.0.6. </li>
<li> <em> New <tt>-P</tt> option to
<a href="forx.html">forx</a> and <a href="forstdin.html">forstdin</a>. </li>
</ul>