From 77a47b2c5e7c3243743bd8d7594366f498e9cef7 Mon Sep 17 00:00:00 2001
From: Laurent Bercot
Date: Fri, 16 Mar 2018 08:18:53 +0000
Subject: More modifications, and doc change
---
doc/background.html | 18 ++++----
doc/backtick.html | 22 ++++-----
doc/componentsb.txt | 4 +-
doc/define.html | 18 ++++----
doc/dollarat.html | 34 ++++++++------
doc/el_pushenv.html | 6 +--
doc/el_semicolon.html | 14 +++---
doc/el_substitute.html | 28 +++++------
doc/el_transform.html | 6 +--
doc/elgetpositionals.html | 2 +-
doc/elglob.html | 18 ++++----
doc/execlineb.html | 2 +-
doc/fdclose.html | 16 +++----
doc/fdmove.html | 20 ++++----
doc/fdreserve.html | 12 ++---
doc/fdswap.html | 16 +++----
doc/forbacktickx.html | 4 +-
doc/foreground.html | 24 +++++-----
doc/forstdin.html | 2 +-
doc/forx.html | 2 +-
doc/getpid.html | 14 +++---
doc/grammar.html | 6 +--
doc/heredoc.html | 18 ++++----
doc/homeof.html | 14 +++---
doc/if.html | 28 +++++------
doc/ifte.html | 2 +-
doc/import.html | 4 +-
doc/importas.html | 24 +++++-----
doc/index.html | 37 +++++++--------
doc/multisubstitute.html | 16 +++----
doc/pipeline.html | 18 ++++----
doc/quine-dam.txt | 102 ++++++++++++++++++++---------------------
doc/quine-jriou.txt | 28 -----------
doc/quine-prj-2.txt | 16 +++----
doc/quine-prj-3.txt | 16 +++----
doc/quine-prj.txt | 16 +++----
doc/redirfd.html | 36 +++++++--------
doc/trap.html | 2 +-
doc/withstdinas.html | 2 +-
examples/etc/execline-shell | 18 ++++----
examples/etc/execline-startup | 4 +-
src/execline/forbacktickx.c | 6 +--
src/execline/multisubstitute.c | 6 +--
src/libexecline/exlsn_import.c | 2 +-
44 files changed, 338 insertions(+), 365 deletions(-)
delete mode 100644 doc/quine-jriou.txt
diff --git a/doc/background.html b/doc/background.html
index 8656b04..f06de3d 100644
--- a/doc/background.html
+++ b/doc/background.html
@@ -3,9 +3,9 @@
- execline: the background command
-
-
+ execline: the & command
+
+
@@ -16,9 +16,9 @@
skarnet.org
- The background program
+ The & program
-background launches a command in the background, then goes on
+& launches a command in the background, then goes on
with the execution flow.
Interface
@@ -28,11 +28,11 @@ with the execution flow.
- background [ -d ] { prog1... } prog2...
+ & [ -d ] { prog1... } prog2...
- - background reads a prog1... command in a
+
- & reads a prog1... command in a
block and unquotes it.
- It spawns a child executing prog1....
- It sets the ! environment
@@ -44,13 +44,13 @@ variable to the pid of the prog1... process.
- -d : doublefork. If the -d option is set,
-prog1... will run as a grandchild of background.
+prog1... will run as a grandchild of &.
Notes
- - background prog1... "" prog2... is
+
- & prog1... "" prog2... is
equivalent to sh -c 'prog1... & ; exec prog2...'.
diff --git a/doc/backtick.html b/doc/backtick.html
index b1e2870..9045629 100644
--- a/doc/backtick.html
+++ b/doc/backtick.html
@@ -3,9 +3,9 @@
- execline: the backtick command
-
-
+ execline: the ` command
+
+
@@ -16,10 +16,10 @@
skarnet.org
- The backtick program
+ The ` program
-backtick runs a program and stores its output in an
+` runs a program and stores its output in an
environment variable, then executes another program.
@@ -30,15 +30,15 @@ environment variable, then executes another program.
- backtick [ -i | -I | -D default ] [ -n ] variable { prog1... } prog2...
+ ` [ -i | -I | -D default ] [ -n ] variable { prog1... } prog2...
- - backtick reads prog1... in a
+
- ` reads prog1... in a
block and unquotes it.
- It runs prog1... as a child process and saves its
output in memory. This output must not contain a null character.
- - backtick execs into prog2..., with
+
- ` execs into prog2..., with
variable added to the environment with prog1...'s
output as a value.
@@ -51,14 +51,14 @@ output.
- The other options tell backtick what to do if prog1...'s output
+ The other options tell ` what to do if prog1...'s output
is not suitable as the contents of an environment variable (i.e. it
contains a null character) or if prog1... crashes or exits
nonzero:
- - -i : backtick exits 1.
+ - -i : ` exits 1.
- -I : variable is removed from
the environment, and execution proceeds.
- -D default : the value of variable
@@ -72,7 +72,7 @@ then execution proceeds.
Notes
- - You can start prog2... with "importas -u variable variable"
+
- You can start prog2... with "$ -u variable variable"
to perform variable substitution.
diff --git a/doc/componentsb.txt b/doc/componentsb.txt
index c65e2e1..c2b672e 100644
--- a/doc/componentsb.txt
+++ b/doc/componentsb.txt
@@ -4,7 +4,7 @@
# silly things on the standard output.
-foreground # an unquoted string, evaluated to: foreground
+; # an unquoted string, evaluated to: ;
{ # A single opening brace, not included in the argv
sleep 1 # Two unquoted strings, evaluated to " sleep" and " 1"
# (without the quotation marks).
@@ -31,7 +31,7 @@ baz"$1"qux # This will evaluate to the word baz$1qux
baz\$1qux # Same here
baz$1qux # Same here in execline-1.y
-${PATH} # This will NOT be replaced by execline ; use the importas command
+${PATH} # This will NOT be replaced by execline ; use the $ command
# if you need the $PATH value.
'this is not a string' # it will be parsed as five separate words
diff --git a/doc/define.html b/doc/define.html
index 4c09c4c..83f6621 100644
--- a/doc/define.html
+++ b/doc/define.html
@@ -3,9 +3,9 @@
- execline: the define command
-
-
+ execline: the = command
+
+
@@ -16,27 +16,27 @@
skarnet.org
- The define program
+ The = program
-define replaces a literal with a value, then executes
+= replaces a literal with a value, then executes
another program.
Interface
- define [ -s ] [ -C | -c ] [ -n ] [ -d delim ] variable value prog...
+ = [ -s ] [ -C | -c ] [ -n ] [ -d delim ] variable value prog...
diff --git a/doc/dollarat.html b/doc/dollarat.html
index 8249bd3..d9346fa 100644
--- a/doc/dollarat.html
+++ b/doc/dollarat.html
@@ -3,9 +3,9 @@
- execline: the dollarat command
-
-
+ execline: the $@ command
+
+
@@ -16,28 +16,28 @@
skarnet.org
- The dollarat program
+ The $@ program
-dollarat prints the positional parameters of an execline script.
+$@ prints the positional parameters of an execline script.
Interface
- dollarat [ -n ] [ -0 | -d delimchar ]
+ $@ [ -n ] [ -0 | -d delimchar ]
- - dollarat reads the number n of "positional
+
- $@ reads the number n of "positional
parameters" in the # environment variable. If that variable
-is not set or does not contain a valid n, dollarat
+is not set or does not contain a valid n, $@
exits 100.
- - dollarat prints the value of the 1 environment
+
- $@ prints the value of the 1 environment
variable, then delimchar, then the value of the 2
environment variable... and so on until n. If one of
-these variables is not set, dollarat exits 100.
- - If everything runs OK, dollarat exits 0. This makes it
+these variables is not set, $@ exits 100.
+ - If everything runs OK, $@ exits 0. This makes it
one of the rare "exiting" execline commands.
@@ -49,7 +49,7 @@ one of the rare "exiting" execline commands.
-d delimchar : use the character
delimchar as separator between the arguments. Default: \n.
If delimchar has more than one character, only the first one is
-used. If delimchar is the empty string, then dollarat
+used. If delimchar is the empty string, then $@
will output the positional parameters as a
sequence of netstrings (and the
-n option will be ignored).
@@ -61,12 +61,16 @@ data to programs that know how to handle null-separated lists.
Notes
#!/command/execlineb
- forbacktickx -0 ARG { dollarat -0 }
+ forbacktickx -0 ARG { \\$@ -0 }
dosomething $ARG
diff --git a/doc/el_pushenv.html b/doc/el_pushenv.html
index d22ce9d..4c63dcc 100644
--- a/doc/el_pushenv.html
+++ b/doc/el_pushenv.html
@@ -94,7 +94,7 @@ printing the list of its arguments.
#!/command/execlineb
elgetpositionals
- foreground { echo $0 $@ }
+ ; { echo $0 $@ }
prog $@
@@ -106,7 +106,7 @@ positional parameters that have no meaning to it. A better script is:
#!/command/execlineb
elgetpositionals
- foreground { echo $0 $@ }
+ ; { echo $0 $@ }
emptyenv -P
prog $@
@@ -162,7 +162,7 @@ at all; for instance, in
Use execlineb -Sn if you need only simple
positional parameter substitution in your script - no
shift or elgetopt,
-no importas 1 1.
+no $ 1 1.
Use execlineb -p, then elgetpositionals if
you don't mind overwriting the current stack of positional parameters.
Use execlineb, then elgetpositionals, then
diff --git a/doc/el_semicolon.html b/doc/el_semicolon.html
index 31446fe..b440a52 100644
--- a/doc/el_semicolon.html
+++ b/doc/el_semicolon.html
@@ -29,14 +29,14 @@ That is precisely what blocks are made for.
execline commands that need more than one linear set of arguments
use blocks. For instance, the
-foreground command needs to spawn a
+; command needs to spawn a
first process, then execute into a second one. It reads the command
line for the first process from a block, and the command line for the
second process from the rest of the argv. In the following script:
#!/command/execlineb
- foreground { echo 1 } echo 2
+ ; { echo 1 } echo 2
echo 1 is read from a block and spawned; then
@@ -68,13 +68,13 @@ spaces.
Actually, the block-reading commands know nothing about braces;
they only understand the "quoted arguments + empty word" syntax.
-So if you want to use foreground
+So if you want to use ;
from your shell to sequence echo 1 and
echo 2, you will have to write
- $ foreground ' echo' ' 1' '' echo 2
+ $ ; ' echo' ' 1' '' echo 2
@@ -83,7 +83,7 @@ that simple case. The following command works as well:
- $ foreground echo 1 '' echo 2
+ $ ; echo 1 '' echo 2
@@ -94,7 +94,7 @@ produce empty words, which may modify your script's execution flow.
- $ define FOO '' foreground ' echo' ' ${FOO}' ' rm' ' -rf' ' /' '' echo blah
+ \$ = FOO '' \; ' echo' ' ${FOO}' ' rm' ' -rf' ' /' '' echo blah
@@ -102,7 +102,7 @@ produce empty words, which may modify your script's execution flow.
- $ define FOO '' foreground echo '${FOO}' rm -rf / '' echo blah
+ \$ = FOO '' \; echo '${FOO}' rm -rf / '' echo blah
diff --git a/doc/el_substitute.html b/doc/el_substitute.html
index 6b72321..e10c8a4 100644
--- a/doc/el_substitute.html
+++ b/doc/el_substitute.html
@@ -35,10 +35,10 @@ real variables, it provides such a substitution facility
via substitution commands, namely:
#!/command/execlineb
-define FOO blah
+= FOO blah
echo $FOO
@@ -148,9 +148,9 @@ nothing special.
#!/command/execlineb
-define A val
-foreground { echo $A \\$A \\\\$A \\\\\\$A \\\\\\\\$A \\\\\\\\\\$A }
- echo $B \\$B \\\\$B \\\\\\$B \\\\\\\\$B \\\\\\\\\\$B
+= A val
+; { echo $A \\$A \\\\$A \\\\\\$A \\\\\\\\$A \\\\\\\\\\$A }
+ echo $B \\$B \\\\$B \\\\\\$B \\\\\\\\$B \\\\\\\\\\$B
prints
@@ -197,7 +197,7 @@ for A.
#!/command/execlineb
-define -s FOO "v1 v2 v3" echo prefix-${FOO}-postfix
+= -s FOO "v1 v2 v3" echo prefix-${FOO}-postfix
@@ -228,7 +228,7 @@ right. For instance, in
#!/command/execlineb
-define -s B "1 2 3" echo ${B}x${B}
+= -s B "1 2 3" echo ${B}x${B}
the ${B}x${B} word will be replaced with nine words:
@@ -241,8 +241,8 @@ define -s B "1 2 3" echo ${B}x${B}
#!/command/execlineb
multisubstitute
{
- define -s A "a b c d"
- define -s B "1 2 3"
+ = -s A "a b c d"
+ = -s B "1 2 3"
}
echo ${A}x${B}
@@ -252,7 +252,7 @@ echo ${A}x${B}
ax1, ax2, ax3, bx1, bx2,
bx3, cx1, cx2, cx3, dx1,
dx2, and dx3, in that order. You can check that the
-order of the define directives in
+order of the = directives in
multisubstitute does not matter.
@@ -264,8 +264,8 @@ be replaced with
#!/command/execlineb
-define -s B "1 2 3"
-define -s A "a b c d"
+= -s B "1 2 3"
+= -s A "a b c d"
echo ${A}x${B}
diff --git a/doc/el_transform.html b/doc/el_transform.html
index f33c576..cba6443 100644
--- a/doc/el_transform.html
+++ b/doc/el_transform.html
@@ -123,7 +123,7 @@ split $1, for instance, you have to ask for it
specifically:
#!/command/execlineb -S1
-define -sd" " ARG1S $1
+= -sd" " ARG1S $1
blah $ARG1S
and $ARG1S will be split using the space character as only delimiter.
@@ -174,7 +174,7 @@ in the following command line:
- $ define -s -d "" A '1:a,2:bb,0:,7:xyz 123,1: ,' echo '$A'
+ $ = -s -d "" A '1:a,2:bb,0:,7:xyz 123,1: ,' echo '$A'
@@ -195,7 +195,7 @@ substitution command will die with an error message.
- The dollarat command, for instance,
+ The $@ command, for instance,
can produce a sequence of netstrings (encoding all the arguments
given to an execline script), meant to be decoded by a substitution
command with the -d "" option.
diff --git a/doc/elgetpositionals.html b/doc/elgetpositionals.html
index b24febe..ce59b72 100644
--- a/doc/elgetpositionals.html
+++ b/doc/elgetpositionals.html
@@ -82,7 +82,7 @@ on the positional parameters, think about replacing the
multisubstitute call containing
the elgetpositionals directive.
If you are going to use the shift
-command, it is best to use importas to
+command, it is best to use $ to
substitute the first positional parameters, then use shift,
then elgetpositionals. That way, $@ will correctly
be replaced by the remaining arguments. More generally, you should
diff --git a/doc/elglob.html b/doc/elglob.html
index 80c438d..5d9f89b 100644
--- a/doc/elglob.html
+++ b/doc/elglob.html
@@ -3,9 +3,9 @@
- execline: the elglob command
-
-
+ execline: the * command
+
+
@@ -16,21 +16,21 @@
skarnet.org
- The elglob program
+ The * program
-elglob performs globbing on a pattern, then executes
+* performs globbing on a pattern, then executes
another program.
Interface
- elglob [ -v ] [ -w ] [ -s ] [ -m ] [ -e ] [ -0 ] variable pattern prog...
+ * [ -v ] [ -w ] [ -s ] [ -m ] [ -e ] [ -0 ] variable pattern prog...
- - elglob performs
+
- * performs
globbing
on pattern.
- It then performs
@@ -38,7 +38,7 @@ on pattern.
prog..., using variable as key and the result of the
globbing as value. The value is always split: it contains as many words
as they are matches for the globbing pattern.
- elglob then execs into the modified prog....
+ * then execs into the modified prog....
Options
@@ -57,7 +57,7 @@ literally; do not allow quoting of metacharacters in pattern via
backslashes. Warning: the
execlineb launcher
uses the backslash as their own escape character - if you want a
-backslash to be passed to elglob, do not forget to double
+backslash to be passed to *, do not forget to double
it.
-0 : null globbing. By default, if pattern
matches nothing, it will be substituted as is (verbatim in one word). With
diff --git a/doc/execlineb.html b/doc/execlineb.html
index 9fa4243..70426d7 100644
--- a/doc/execlineb.html
+++ b/doc/execlineb.html
@@ -178,7 +178,7 @@ the execline grammar.
External execline commands that read blocks, like
-foreground, use the EXECLINE_STRICT
+;, use the EXECLINE_STRICT
environment variable: if it is set to 1, they will print a warning message
on stderr if they find their blocks not to be properly quoted. If it is set
to 2, they will also die. If it is set to 0, or unset, they won't complain
diff --git a/doc/fdclose.html b/doc/fdclose.html
index 2101690..b014384 100644
--- a/doc/fdclose.html
+++ b/doc/fdclose.html
@@ -3,9 +3,9 @@
-
execline: the fdclose program
-
-
+ execline: the >&- program
+
+
@@ -16,28 +16,28 @@
skarnet.org
- The fdclose program
+ The >&- program
-fdclose closes a given file descriptor, then
+>&- closes a given file descriptor, then
executes a program.
Interface
- fdclose fd prog...
+ >&- fd prog...
-fdclose closes the file descriptor number fd, then
+>&- closes the file descriptor number fd, then
execs into prog with its arguments.
Notes
- - fdclose n prog... is roughly equivalent to
+
- >&- n prog... is roughly equivalent to
sh -c 'exec prog... n<&-'
diff --git a/doc/fdmove.html b/doc/fdmove.html
index 39bdb2b..f8cf841 100644
--- a/doc/fdmove.html
+++ b/doc/fdmove.html
@@ -3,9 +3,9 @@
- execline: the fdmove program
-
-
+ execline: the >& program
+
+
@@ -16,23 +16,23 @@
skarnet.org
- The fdmove program
+ The >& program
-fdmove moves or copies a given file descriptor, then
+>& moves or copies a given file descriptor, then
executes a program.
Interface
- fdmove [ -c ] fdto fdfrom prog...
+ >& [ -c ] fdto fdfrom prog...
-fdmove moves the file descriptor number fdfrom,
+>& moves the file descriptor number fdfrom,
to number fdto, then execs into prog with its arguments.
-If fdto is open, fdmove closes it before moving
+If fdto is open, >& closes it before moving
fdfrom to it.
@@ -46,9 +46,9 @@ instead of moving it; do not close fdfrom.
Notes
- - fdmove -c a b prog... is roughly equivalent to
+
- >& -c a b prog... is roughly equivalent to
sh -c 'exec prog... a>&b'
- - fdmove a b prog... is roughly equivalent to
+
- >& a b prog... is roughly equivalent to
sh -c 'exec prog... a>&b b<&-'
diff --git a/doc/fdreserve.html b/doc/fdreserve.html
index cc808da..6fd168b 100644
--- a/doc/fdreserve.html
+++ b/doc/fdreserve.html
@@ -50,8 +50,8 @@ use:
fdreserve 2
multisubstitute
{
- importas fdr FD0
- importas fdw FD1
+ $ fdr FD0
+ $ fdw FD1
}
piperw $fdr $fdw
prog...
@@ -67,15 +67,15 @@ descriptors that are free at the time it is run. A program like
fdreserve 3
multisubstitute
{
- importas fdr FD0
- importas fdw FD1
+ $ fdr FD0
+ $ fdw FD1
}
piperw $fdr $fdw
fdreserve 1
multisubstitute
{
- importas oldfd FD2
- importas newfd FD0
+ $ oldfd FD2
+ $ newfd FD0
}
prog...
diff --git a/doc/fdswap.html b/doc/fdswap.html
index cc055de..0ff845f 100644
--- a/doc/fdswap.html
+++ b/doc/fdswap.html
@@ -3,9 +3,9 @@
- execline: the fdswap program
-
-
+ execline: the <> program
+
+
@@ -16,28 +16,28 @@
skarnet.org
- The fdswap program
+ The <> program
-fdswap swaps two file descriptors, then
+<> swaps two file descriptors, then
executes a program.
Interface
- fdswap fd1 fd2 prog...
+ <> fd1 fd2 prog...
-fdswaps swaps file descriptors numbered fd1 and
+<> swaps file descriptors numbered fd1 and
fd2, then execs into prog with its arguments.
Notes
- - fdswap has no portable shell equivalent.
+ - <> has no portable shell equivalent.
diff --git a/doc/forbacktickx.html b/doc/forbacktickx.html
index e116be6..5a9dc3e 100644
--- a/doc/forbacktickx.html
+++ b/doc/forbacktickx.html
@@ -79,9 +79,9 @@ split x.
You can start loop... with "import -u variable"
to perform variable substitution.
forbacktickx is now implemented as a wrapper around the
-pipeline and
+| and
forstdin commands, with calls to
-fdmove to ensure that loop... is called
+>& to ensure that loop... is called
with the proper standard input.
diff --git a/doc/foreground.html b/doc/foreground.html
index c9c0703..b7cf906 100644
--- a/doc/foreground.html
+++ b/doc/foreground.html
@@ -3,9 +3,9 @@
- execline: the foreground command
-
-
+ execline: the ; command
+
+
@@ -16,10 +16,10 @@
skarnet.org
- The foreground program
+ The ; program
-foreground executes a sequence of commands.
+;/tt> executes a sequence of commands.
Interface
@@ -29,35 +29,35 @@
- foreground { prog1... } prog2...
+ ; { prog1... } prog2...
- - foreground reads prog1 in a
+
- ; reads prog1 in a
block. It forks and
executes it, then waits for it to complete.
- - foreground sets the ? environment
+
- ; sets the ? environment
variable to the exit code of prog1. If prog1...
was killed by a signal, the ? value is 256 plus the signal
number.
- - foreground then execs into prog2....
+ - ; then execs into prog2....
Notes
- - foreground is the basic sequence operator: it takes two
+
- ; is the basic sequence operator: it takes two
commands and executes them one by one. execline scripts require it to
wrap external commands that exit instead of natively supporting the
"perform some action, then execute some other program" model.
- - foreground prog1... "" prog2... is
+
- ; prog1... "" prog2... is
equivalent to sh -c 'prog1... ; exec prog2...'.
- 256 and above are not valid exit codes for commands, so when the
? environment variable contains 256 or more, it means that the
previous command was killed by a signal. There is no ambiguity here, and
? reports exactly what happened to the previous command;
-foreground does not exit, so there is no need for
+; does not exit, so there is no need for
exit code approximation.
diff --git a/doc/forstdin.html b/doc/forstdin.html
index 5228aee..ff01dc4 100644
--- a/doc/forstdin.html
+++ b/doc/forstdin.html
@@ -71,7 +71,7 @@ split x.
Notes
- - You can start loop... with "importas -u variable variable"
+
- You can start loop... with "$ -u variable variable"
to perform variable substitution.
diff --git a/doc/forx.html b/doc/forx.html
index 1c2a61c..b3461aa 100644
--- a/doc/forx.html
+++ b/doc/forx.html
@@ -68,7 +68,7 @@ listed in the breakcodes list, else it will exit 1.
Notes
- - You can start loop with "importas -u variable variable"
+
- You can start loop with "$ -u variable variable"
if you want variable substitution.
diff --git a/doc/getpid.html b/doc/getpid.html
index ca363df..8bcb463 100644
--- a/doc/getpid.html
+++ b/doc/getpid.html
@@ -3,9 +3,9 @@
- execline: the getpid program
-
-
+ execline: the ! program
+
+
@@ -16,21 +16,21 @@
skarnet.org
- The getpid program
+ The ! program
-getpid stores its process ID in a given environment variable,
+! stores its process ID in a given environment variable,
then executes a program.
Interface
- getpid var prog...
+ ! var prog...
-getpid stores its PID in the var variable, then
+! stores its PID in the var variable, then
execs into prog with its arguments.
diff --git a/doc/grammar.html b/doc/grammar.html
index dd2ea62..ddc746e 100644
--- a/doc/grammar.html
+++ b/doc/grammar.html
@@ -133,12 +133,12 @@ arguments, the arglist, then executes into a (possibly empty)
instruction.
Some builtins are special because they also take a
non-empty blocklist after their arglist. For instance,
-the foreground command takes an empty
+the ; command takes an empty
arglist and one block:
#!/command/execlineb -P
- foreground { sleep 1 } echo blah
+ ; { sleep 1 } echo blah
is a valid execlineb script.
-The foreground command uses the
+The ; command uses the
sleep 1 block then execs into the
remaining echo blah instruction.
diff --git a/doc/heredoc.html b/doc/heredoc.html
index dd68a3f..002ffaa 100644
--- a/doc/heredoc.html
+++ b/doc/heredoc.html
@@ -3,9 +3,9 @@
- execline: the heredoc program
-
-
+ execline: the << program
+
+
@@ -16,21 +16,21 @@
skarnet.org
- The heredoc program
+ The << program
-heredoc runs a command with a certain string fed to a
+<< runs a command with a certain string fed to a
file descriptor.
Interface
- heredoc [ -d ] fd string prog...
+ << [ -d ] fd string prog...
- homeof user
+ ~ user
-homeof finds the name of user's home directory, writes
+~ finds the name of user's home directory, writes
it on stdout, then exits 0. If an error occurs, it prints nothing on
stdout but exits 111 with an explanatory message on stderr.
diff --git a/doc/if.html b/doc/if.html
index 700ee59..09f944a 100644
--- a/doc/if.html
+++ b/doc/if.html
@@ -3,9 +3,9 @@
- execline: the if command
-
-
+ execline: the && command
+
+
@@ -16,10 +16,10 @@
skarnet.org
- The if program
+ The && program
-if performs conditional execution.
+&& performs conditional execution.
Interface
@@ -29,18 +29,18 @@
- if [ -X ] [ -n ] [ -t | -x exitcode ] { prog1... } prog2...
+ && [ -X ] [ -n ] [ -t | -x exitcode ] { prog1... } prog2...
- - if reads prog1... in a
+
- && reads prog1... in a
block. It forks and executes it,
then waits for it to complete.
- - If prog1 crashes, if prints an error message
+
- If prog1 crashes, && prints an error message
then exits 128 plus the number of the signal that killed prog1.
- If prog1 exits a non-zero status,
-if exits 1.
- - Else if execs into prog2.
+&& exits 1.
+ - Else && execs into prog2.
Options
@@ -56,12 +56,12 @@ This is equivalent to -x 0.
Notes
diff --git a/doc/ifte.html b/doc/ifte.html
index 56fb55e..dbfe5ef 100644
--- a/doc/ifte.html
+++ b/doc/ifte.html
@@ -62,7 +62,7 @@ It performs only conditional execution, not instruction sequence.
"ifthenelse { progif } { progthen } { progelse } remainder" is the
-equivalent of "foreground { ifte { progthen } { progelse } progif } remainder".
+equivalent of "; { ifte { progthen } { progelse } progif } remainder".
diff --git a/doc/import.html b/doc/import.html
index 8efcdd1..10dbffb 100644
--- a/doc/import.html
+++ b/doc/import.html
@@ -31,7 +31,7 @@ then executes another program.
- import behaves exactly as
-importas envvar envvar.
+$ envvar envvar.
Notes
@@ -39,7 +39,7 @@ then executes another program.
- Starting in execline-2.5.0.0, the import command is
marked as obsolescent; it will disappear in a future version of execline.
-It is recommended to use the importas
+It is recommended to use the $
command instead.
diff --git a/doc/importas.html b/doc/importas.html
index 0bd8246..280f527 100644
--- a/doc/importas.html
+++ b/doc/importas.html
@@ -3,9 +3,9 @@
- execline: the importas program
-
-
+ execline: the $ program
+
+
@@ -16,28 +16,28 @@
skarnet.org
- The importas program
+ The $ program
-importas replaces a literal with the value of an
+$ replaces a literal with the value of an
environment variable, then executes another program.
Interface
- importas [ -i | -D default ] [ -u ] [ -s ] [ -C | -c ] [ -n ] [ -d delim ] variable envvar prog...
+ $ [ -i | -D default ] [ -u ] [ -s ] [ -C | -c ] [ -n ] [ -d delim ] variable envvar prog...
- - importas fetches the value of envvar in the
+
- $ fetches the value of envvar in the
environment. If neither the -D nor the -i option is given,
and envvar is undefined, no word is returned
(that is different from the empty word).
- - importas then performs
+
- $ then performs
variable substitution on prog...,
with variable as key and that string as value.
-
- importas then execs into the modified prog....
+ - $ then execs into the modified prog....
Options
@@ -48,11 +48,11 @@ with variable as key and that string as value.
variable instead of no word. For instance, to substitute
the empty word, use -D "".
-i : Insist. If envvar is undefined,
-importas will not do anything; instead, it will exit 100 with an
+$ will not do anything; instead, it will exit 100 with an
error message. This has precedence over any -D option.
-u : Unexport. envvar will be removed from
-the environment after the substitution. importas -u variable
-envvar is equivalent to importas variable
+the environment after the substitution. $ -u variable
+envvar is equivalent to $ variable
envvar unexport envvar.
Other options are used to control
the substitution mechanism.
diff --git a/doc/index.html b/doc/index.html
index aabda00..dccdecf 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -130,17 +130,17 @@ to your installation: the shebang lines for your system might be something like
The emptyenv program
The export program
The unexport program
-The fdclose program
+The >&- program
The fdblock program
-The fdmove program
-The fdswap program
+The >& program
+The <> program
The fdreserve program
-The redirfd program
+The < program
The piperw program
-The heredoc program
+The << program
The wait program
The getcwd program
-The getpid program
+The ! program
The exec program
The tryexec program
The exit program
@@ -151,24 +151,24 @@ to your installation: the shebang lines for your system might be something like
(Basic block management)
(Variable management)
-- The define program
-- The importas program
+- The = program
+- The $ program
- The import program
-- The elglob program
+- The * program
- The elgetpositionals program
- The multidefine program
- The multisubstitute program
@@ -188,13 +188,13 @@ to your installation: the shebang lines for your system might be something like
(Miscellaneous)
Provided scripts: example .profile replacement
@@ -207,10 +207,7 @@ to your installation: the shebang lines for your system might be something like
Fun stuff
-- An execline quine. This was quinely provided by
-Joël Riou. The only
-external command used is echo.
-- Another quine, provided by
+
- A quine, provided by
Paul Jarc. It is much shorter, but
uses the external commands echo and env. Later, Paul rewrote
it using only echo, then
diff --git a/doc/multisubstitute.html b/doc/multisubstitute.html
index ecfff9b..be3d455 100644
--- a/doc/multisubstitute.html
+++ b/doc/multisubstitute.html
@@ -32,10 +32,10 @@ its argv, then executes another program.
multisubstitute
{
- [ define [ -n ] [ -s ] [ -C | -c ] [ -d delim ] variable value ]
- [ importas [ -i | -D default ] [ -n ] [ -s ] [ -C | -c ] [ -d delim ] variable envvar ]
+ [ = [ -n ] [ -s ] [ -C | -c ] [ -d delim ] variable value ]
+ [ $ [ -i | -D default ] [ -n ] [ -s ] [ -C | -c ] [ -d delim ] variable envvar ]
[ import [ -i | -D default ] [ -n ] [ -s ] [ -C | -c ] [ -d delim ] envvar ]
- [ elglob [ -v ] [ -w ] [ -s ] [ -m ] [ -e ] [ -0 ] variable pattern ]
+ [ * [ -v ] [ -w ] [ -s ] [ -m ] [ -e ] [ -0 ] variable pattern ]
[ elgetpositionals [ -P sharp ] ]
[ multidefine value { variable... } ]
...
@@ -55,7 +55,7 @@ to learn about the syntax of each substitution command.
Options
- - If an import or importas directive was given with the
+
- If an import or $ directive was given with the
-i option, and the looked up variable is undefined,
multisubstitute will exit 100.
@@ -72,8 +72,8 @@ to learn about the syntax of each substitution command.
#!/command/execlineb
export A wrong
- define B ${A}
- import A
+ = B ${A}
+ $ A A
echo ${B}
@@ -87,8 +87,8 @@ to learn about the syntax of each substitution command.
export A wrong
multisubstitute
{
- define B ${A}
- import A
+ = B ${A}
+ $ A A
}
echo ${B}
diff --git a/doc/pipeline.html b/doc/pipeline.html
index 99a89e0..13882f1 100644
--- a/doc/pipeline.html
+++ b/doc/pipeline.html
@@ -3,9 +3,9 @@
- execline: the pipeline command
-
-
+ execline: the | command
+
+
@@ -16,10 +16,10 @@
skarnet.org
- The pipeline program
+ The | program
-pipeline runs two commands with a pipe between them.
+| runs two commands with a pipe between them.
Interface
@@ -29,11 +29,11 @@
- pipeline [ -d ] [ -r | -w ] { prog1... } prog2...
+ | [ -d ] [ -r | -w ] { prog1... } prog2...
- - pipeline reads prog1... in a
+
- | reads prog1... in a
block and unquotes it.
- It runs prog1... as a child process and execs into
prog2..., with a pipe between prog1's stdout and
@@ -46,7 +46,7 @@ environment variable.
- -d : run prog1...
-as a grandchild of pipeline. This is meant to prevent a zombie
+as a grandchild of |. This is meant to prevent a zombie
from hanging around if prog2... fails to wait for its children.
- -r : make prog1... the writer and
prog2... the reader. This is the default.
@@ -57,7 +57,7 @@ from hanging around if prog2... fails to wait for its children.
Notes
- - You can easily create a chain of pipes: pipeline a "" pipeline b "" c
+
- You can easily create a chain of pipes: | a "" | b "" c
is roughly equivalent to
sh -c 'exec a | b | c', except that shells usually run c
as a child process like a and b, and exec has no
diff --git a/doc/quine-dam.txt b/doc/quine-dam.txt
index c69a52c..219a594 100644
--- a/doc/quine-dam.txt
+++ b/doc/quine-dam.txt
@@ -3,7 +3,7 @@
# See comments below.
# (Search for "HERE".)
#
-define -sCd "\n" lns "
+= -sCd "\n" lns "
${p} ${bubble} is the end of the quine's data.
${p} They represent the following code, with various quotations:
${p} ${b} (backslash) is represented as ${d}${ob}b${cb}
@@ -19,38 +19,38 @@ ${p}
${p} Now we have the quine's code!
${p}
${p} First, print the lines that come before the data.
-foreground ${ob} printf %s ${b}${p}${b}!${q} ${q} ${cb}
-foreground ${ob} printf %s${b}${b}n ${q}/command/execlineb -P${q} ${cb}
-foreground ${ob} printf %s${b}${b}n ${b}${p}${q} Public Domain.${q} ${cb}
-foreground ${ob} printf %s${b}${b}n ${b}${p}${q} See comments below.${q} ${cb}
-foreground ${ob} printf %s ${b}${p}${q} (Search for ${q} ${cb}
-foreground ${ob} printf %s${b}${b}n ${b}${q}${bubble}${b}${q}.) ${cb}
-foreground ${ob} printf %s${b}${b}n ${b}${p} ${cb}
-foreground ${ob} printf %s ${q}define -sCd ${b}${q}${b}${b}n${b}${q} lns ${b}${q}${q} ${cb}
+; ${ob} printf %s ${b}${p}${b}!${q} ${q} ${cb}
+; ${ob} printf %s${b}${b}n ${q}/command/execlineb -P${q} ${cb}
+; ${ob} printf %s${b}${b}n ${b}${p}${q} Public Domain.${q} ${cb}
+; ${ob} printf %s${b}${b}n ${b}${p}${q} See comments below.${q} ${cb}
+; ${ob} printf %s ${b}${p}${q} (Search for ${q} ${cb}
+; ${ob} printf %s${b}${b}n ${b}${q}${bubble}${b}${q}.) ${cb}
+; ${ob} printf %s${b}${b}n ${b}${p} ${cb}
+; ${ob} printf %s ${q}define -sCd ${b}${q}${b}${b}n${b}${q} lns ${b}${q}${q} ${cb}
${p} Next, print the data themselves, as data.
for lin ${ob} ${d}${ob}lns${cb} ${cb} ${ob}
multisubstitute ${ob}
-define b ${d}${ob}b${cb}
-define q ${d}${ob}q${cb}
-define p ${d}${ob}p${cb}
-define ob ${d}${ob}ob${cb}
-define cb ${d}${ob}cb${cb}
-define d ${d}${ob}d${cb}
-define bubble ${d}${ob}bubble${cb}
-define intron ${d}${ob}intron${cb}
+= b ${d}${ob}b${cb}
+= q ${d}${ob}q${cb}
+= p ${d}${ob}p${cb}
+= ob ${d}${ob}ob${cb}
+= cb ${d}${ob}cb${cb}
+= d ${d}${ob}d${cb}
+= bubble ${d}${ob}bubble${cb}
+= intron ${d}${ob}intron${cb}
${cb} printf ${b}${b}n%s ${d}${ob}lin${cb} ${cb}
-foreground ${ob} printf %s${b}${b}n ${b}${q} ${cb}
+; ${ob} printf %s${b}${b}n ${b}${q} ${cb}
${p} Finally, use the data to print the code!
for lin ${ob} ${d}${ob}lns${cb} ${cb} ${ob}
multisubstitute ${ob}
-define b ${b}${b}
-define q ${b}${q}
-define p ${b}${p}
-define ob ${b}${ob}
-define cb ${b}${cb}
-define d ${d}
-define bubble ${bubble}
-define intron ${q}${intron}${q}
+= b ${b}${b}
+= q ${b}${q}
+= p ${b}${p}
+= ob ${b}${ob}
+= cb ${b}${cb}
+= d ${d}
+= bubble ${bubble}
+= intron ${q}${intron}${q}
${cb} printf %s${b}${b}n ${d}${ob}lin${cb} ${cb}
${p} That's all, folks! - Well, that wasn't so hard, was it?
${p} (This quine was written by - see
@@ -71,38 +71,38 @@ ${p} for more information on quines and how to write them.)"
# Now we have the quine's code!
#
# First, print the lines that come before the data.
-foreground { printf %s \#\!" " }
-foreground { printf %s\\n "/command/execlineb -P" }
-foreground { printf %s\\n \#" Public Domain." }
-foreground { printf %s\\n \#" See comments below." }
-foreground { printf %s \#" (Search for " }
-foreground { printf %s\\n \"HERE\".) }
-foreground { printf %s\\n \# }
-foreground { printf %s "define -sCd \"\\n\" lns \"" }
+; { printf %s \#\!" " }
+; { printf %s\\n "/command/execlineb -P" }
+; { printf %s\\n \#" Public Domain." }
+; { printf %s\\n \#" See comments below." }
+; { printf %s \#" (Search for " }
+; { printf %s\\n \"HERE\".) }
+; { printf %s\\n \# }
+; { printf %s "= -sCd \"\\n\" lns \"" }
# Next, print the data themselves, as data.
for lin { ${lns} } {
multisubstitute {
-define b ${b}
-define q ${q}
-define p ${p}
-define ob ${ob}
-define cb ${cb}
-define d ${d}
-define bubble ${bubble}
-define intron ${intron}
+= b ${b}
+= q ${q}
+= p ${p}
+= ob ${ob}
+= cb ${cb}
+= d ${d}
+= bubble ${bubble}
+= intron ${intron}
} printf \\n%s ${lin} }
-foreground { printf %s\\n \" }
+; { printf %s\\n \" }
# Finally, use the data to print the code!
for lin { ${lns} } {
multisubstitute {
-define b \\
-define q \"
-define p \#
-define ob \{
-define cb \}
-define d $
-define bubble HERE
-define intron "NOTICE HOW THIS SENTENCE APPEARS ONLY ONCE IN THIS QUINE?"
+= b \\
+= q \"
+= p \#
+= ob \{
+= cb \}
+= d $
+= bubble HERE
+= intron "NOTICE HOW THIS SENTENCE APPEARS ONLY ONCE IN THIS QUINE?"
} printf %s\\n ${lin} }
# That's all, folks! - Well, that wasn't so hard, was it?
# (This quine was written by - see
diff --git a/doc/quine-jriou.txt b/doc/quine-jriou.txt
deleted file mode 100644
index f8e5455..0000000
--- a/doc/quine-jriou.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/command/execlineb
-define A "#!/command/execlineb"
-define B "fine G $ foreground { echo ${C} }
-echo -n foreground ${D} define C ${E}${C}${R}foreground
-${D} echo ${G}${D}A${H} ${H}${R}foreground
-${D} echo define A ${G}${D}C${H}${G}${D}A${H}${G}${D}C${H} ${H}${R}echo
--n define B ${G}${D}C${H} ${H}${R}foreground
-${D} echo -n ${G}${D}B${H} ${H}${R}foreground
-${D} multisubstitute ${D} define C ${E}${C} define D ${E}${D}${R}define
-E ${E}${E}${R}define
-H ${E}${H} define R ${C}${R}${C} ${H} de } echo ${B}"
-foreground { define C \"
-foreground { echo ${A} }
-foreground { echo define A ${C}${A}${C} }
-echo -n define B ${C} }
-foreground { echo -n ${B} }
-foreground { multisubstitute { define C \" define D \{
-define E \\
-define H \} define R "
-" } define G $ foreground { echo ${C} }
-echo -n foreground ${D} define C ${E}${C}${R}foreground
-${D} echo ${G}${D}A${H} ${H}${R}foreground
-${D} echo define A ${G}${D}C${H}${G}${D}A${H}${G}${D}C${H} ${H}${R}echo
--n define B ${G}${D}C${H} ${H}${R}foreground
-${D} echo -n ${G}${D}B${H} ${H}${R}foreground
-${D} multisubstitute ${D} define C ${E}${C} define D ${E}${D}${R}define
-E ${E}${E}${R}define
-H ${E}${H} define R ${C}${R}${C} ${H} de } echo ${B}
diff --git a/doc/quine-prj-2.txt b/doc/quine-prj-2.txt
index 9c60b92..1c6c6a1 100644
--- a/doc/quine-prj-2.txt
+++ b/doc/quine-prj-2.txt
@@ -1,15 +1,15 @@
#!/command/execlineb
-define e "#!/command/execlineb
-define e ${q}${E}${q}
+= e "#!/command/execlineb
+= e ${q}${E}${q}
multisubstitute {
-define q ${b}${q}
-define b ${b}${b}
-define E $e
+= q ${b}${q}
+= b ${b}${b}
+= E $e
}
echo $e"
multisubstitute {
-define q \"
-define b \\
-define E $e
+= q \"
+= b \\
+= E $e
}
echo $e
diff --git a/doc/quine-prj-3.txt b/doc/quine-prj-3.txt
index e5b5708..36e8aa3 100644
--- a/doc/quine-prj-3.txt
+++ b/doc/quine-prj-3.txt
@@ -1,13 +1,13 @@
#!/command/execlineb -P
-define e "#!/command/execlineb -P
-define e ${q}${E}${q}
+= e "#!/command/execlineb -P
+= e ${q}${E}${q}
export E $e
-define q ${b}${q}
-define b ${b}${b}
-import E
+= q ${b}${q}
+= b ${b}${b}
+$ E E
echo $e"
export E $e
-define q \"
-define b \\
-import E
+= q \"
+= b \\
+$ E E
echo $e
diff --git a/doc/quine-prj.txt b/doc/quine-prj.txt
index 8d2643f..e567d07 100644
--- a/doc/quine-prj.txt
+++ b/doc/quine-prj.txt
@@ -1,13 +1,13 @@
#!/command/execlineb
-define e "#!/command/execlineb
-define e $q${E}${q}
+= e "#!/command/execlineb
+= e $q${E}${q}
env e=$e
-define q ${b}${q}
-define b ${b}${b}
-importas E e
+= q ${b}${q}
+= b ${b}${b}
+$ E e
echo $e"
env e=$e
-define q \"
-define b \\
-importas E e
+= q \"
+= b \\
+$ E e
echo $e
diff --git a/doc/redirfd.html b/doc/redirfd.html
index 94135a9..a8efdd8 100644
--- a/doc/redirfd.html
+++ b/doc/redirfd.html
@@ -3,9 +3,9 @@
- execline: the redirfd command
-
-
+ execline: the < command
+
+
@@ -16,21 +16,21 @@
skarnet.org
-
The redirfd program
+ The < program
-redirfd redirects a given file descriptor to a file, then
+< redirects a given file descriptor to a file, then
executes a program.
Interface
- redirfd [ -r | -w | -u | -a | -c | -x ] [ -n | -b ] fd file prog...
+ < [ -r | -w | -u | -a | -c | -x ] [ -n | -b ] fd file prog...
-redirfd redirects the file descriptor number fd
+< redirects the file descriptor number fd
to file, then execs into prog....
@@ -57,18 +57,18 @@ to blocking mode if it was.
Notes
- - redirfd -r n file prog... is roughly equivalent to
+
- < -r n file prog... is roughly equivalent to
sh -c 'exec prog... n<file'
- - redirfd -w n file prog... is roughly equivalent to
+
- < -w n file prog... is roughly equivalent to
sh -c 'exec prog... n>file'
- - redirfd -u n file prog... is roughly equivalent to
+
- < -u n file prog... is roughly equivalent to
sh -c 'exec prog... n<>file'
- - redirfd -a n file prog... is roughly equivalent to
+
- < -a n file prog... is roughly equivalent to
sh -c 'exec prog... n>>file'
- - redirfd -c n file prog... has no portable
+
- < -c n file prog... has no portable
shell equivalent. Some shells provide the noclobber option for
a similar feature.
- - redirfd -x n file prog... has no portable
+
- < -x n file prog... has no portable
shell equivalent.
@@ -81,19 +81,19 @@ named pipes.
- Opening a fifo for reading, blocking if there is no writer:
-redirfd -r n fifo prog...
+< -r n fifo prog...
- Opening a fifo for reading, with instant success even if
there is no writer, and blocking at the first attempt to read from it:
-redirfd -r -nb n fifo prog...
+< -r -nb n fifo prog...
- Opening a fifo for writing, blocking if there is no reader:
-redirfd -w n fifo prog...
+< -w n fifo prog...
- Opening a fifo for writing, with instant success even if
there is no reader:
-redirfd -w -nb n fifo prog.... Warning:
+< -w -nb n fifo prog.... Warning:
the first attempt to write to the fifo will raise a SIGPIPE if there is
still no reader at that time. The named pipe semantics normally do not
allow a fifo to be open for writing without a reading end, and you
-should know what you are doing if you're using redirfd
+should know what you are doing if you're using <
this way.
diff --git a/doc/trap.html b/doc/trap.html
index 03d5bc4..b19fd89 100644
--- a/doc/trap.html
+++ b/doc/trap.html
@@ -87,7 +87,7 @@ infinite (i.e. a timeout directive will never trigger).
- Programs defined in command line directives can start with
-importas ! ! to retrieve the pid of
+$ ! ! to retrieve the pid of
prog in ${!}
- trap is a standard shell builtin, with similar
functionality. It is more idiomatic, and probably more efficient,
diff --git a/doc/withstdinas.html b/doc/withstdinas.html
index f0db24a..75dfe80 100644
--- a/doc/withstdinas.html
+++ b/doc/withstdinas.html
@@ -66,7 +66,7 @@ start of the input is, up to the first null character; and execution proceeds. <
Notes
- - You can start prog... with "importas -u variable variable"
+
- You can start prog... with "$ -u variable variable"
to perform variable substitution.
diff --git a/examples/etc/execline-shell b/examples/etc/execline-shell
index ac8c141..3e406d7 100755
--- a/examples/etc/execline-shell
+++ b/examples/etc/execline-shell
@@ -1,18 +1,18 @@
#!/bin/execlineb -S0
-backtick -n defaulthome
+` -n defaulthome
{
- if -nt
+ && -nt
{
- backtick -n defaultuser { id -un }
- importas -u defaultuser defaultuser
- importas -D $defaultuser USER USER
- redirfd -w 2 /dev/null
- homeof ${USER}
+ ` -n defaultuser { id -un }
+ $ -u defaultuser defaultuser
+ $ -D $defaultuser USER USER
+ < -w 2 /dev/null
+ ~ ${USER}
}
s6-echo /
}
-importas -u defaulthome defaulthome
-importas -D $defaulthome HOME HOME
+$ -u defaulthome defaulthome
+$ -D $defaulthome HOME HOME
tryexec { ${HOME}/.execline-shell $@ }
/bin/sh $@
diff --git a/examples/etc/execline-startup b/examples/etc/execline-startup
index 4afc557..6e5769a 100755
--- a/examples/etc/execline-startup
+++ b/examples/etc/execline-startup
@@ -2,8 +2,8 @@
/bin/multisubstitute
{
- importas -i HOME HOME
- importas -i LOGNAME LOGNAME
+ $ -i HOME HOME
+ $ -i LOGNAME LOGNAME
}
/bin/export USER ${LOGNAME}
/bin/s6-envdir /etc/env-startup
diff --git a/src/execline/forbacktickx.c b/src/execline/forbacktickx.c
index 8b31d92..0ae42e4 100644
--- a/src/execline/forbacktickx.c
+++ b/src/execline/forbacktickx.c
@@ -72,7 +72,7 @@ int main (int argc, char const *const *argv, char const *const *envp)
if (errno != EBADF) strerr_diefu1sys(111, "dup stdin") ;
}
else fmt[uint_fmt(fmt, (unsigned int)fd)] = 0 ;
- newargv[m++] = EXECLINE_BINPREFIX "pipeline" ;
+ newargv[m++] = EXECLINE_BINPREFIX "|" ;
newargv[m++] = "--" ;
while (argv[i] && argv[i][0] != EXECLINE_BLOCK_END_CHAR && (!EXECLINE_BLOCK_END_CHAR || (argv[i][0] && argv[i][1])))
newargv[m++] = argv[i++] ;
@@ -99,12 +99,12 @@ int main (int argc, char const *const *argv, char const *const *envp)
newargv[m++] = argv[0] ;
if (fd < 0)
{
- newargv[m++] = EXECLINE_BINPREFIX "fdclose" ;
+ newargv[m++] = EXECLINE_BINPREFIX ">&-" ;
newargv[m++] = "0" ;
}
else
{
- newargv[m++] = EXECLINE_BINPREFIX "fdmove" ;
+ newargv[m++] = EXECLINE_BINPREFIX ">&" ;
newargv[m++] = "0" ;
newargv[m++] = fmt ;
}
diff --git a/src/execline/multisubstitute.c b/src/execline/multisubstitute.c
index 444ea47..d140590 100644
--- a/src/execline/multisubstitute.c
+++ b/src/execline/multisubstitute.c
@@ -9,10 +9,10 @@
static char const *const commands[8] =
{
- "define",
- "importas",
+ "=",
+ "$",
"import",
- "elglob",
+ "*",
"elgetpositionals",
"multidefine",
0
diff --git a/src/libexecline/exlsn_import.c b/src/libexecline/exlsn_import.c
index 254ab78..61f7cdf 100644
--- a/src/libexecline/exlsn_import.c
+++ b/src/libexecline/exlsn_import.c
@@ -73,7 +73,7 @@ static int exlsn_import_as (int argc, char const **argv, char const *const *envp
int exlsn_import (int argc, char const **argv, char const *const *envp, exlsn_t *info)
{
- strerr_warnw1x("the import command and directive are obsolescent, please use importas instead!") ;
+ strerr_warnw1x("the import command and directive are obsolescent, please use $ instead!") ;
return exlsn_import_as(argc, argv, envp, info, 0) ;
}
--
cgit v1.2.3