summaryrefslogtreecommitdiff
path: root/sys/man/1
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2021-12-31 15:27:10 +0000
committercinap_lenrek <cinap_lenrek@felloff.net>2021-12-31 15:27:10 +0000
commitb90036a062ca330ac5f667cd1ee503686cbe0b80 (patch)
treeab9538715188d5017843c6d94e2ee4c5e155448a /sys/man/1
parent855cf4326f5a07d7142c2d8918f5fa856d912b85 (diff)
rc: fix everything
Untangle the lexer and interpreter thread state. Fix the file and line number error reporting, getting rid of Xsrcfile instruction, as the whole code block can only come from a single file, stuff the source file in slot[1] of the code block instead. Remove limitations for globber (path element limits) and be more intelligent about handling globbing by inserting Xglob instruction only when needed and not run it over every Xsimple argument list. Remove fragile ndot magic and make it explicit by adding the -q flag to . builtin command. Add -b flag for full compilation. Make exitnext() smart, so we can speculate thru rcmain and avoid the fork(). Get rid of all print(2) format functions and use io instead. Improve the io library, adding rstr() to handle tokenization, which allows us to look ahead in the already read buffer for the terminators, avoiding alot of string copies. Auto indent pcmd(), to make line number reporting more usefull. Implement here documents properly, so they can work everywhere.
Diffstat (limited to 'sys/man/1')
-rw-r--r--sys/man/1/rc22
1 files changed, 19 insertions, 3 deletions
diff --git a/sys/man/1/rc b/sys/man/1/rc
index 252fd8a60..f994d5b32 100644
--- a/sys/man/1/rc
+++ b/sys/man/1/rc
@@ -615,7 +615,7 @@ usually because their execution changes or depends on
internal state.
.PD 0
.HP
-.BI . " file ..."
+.BI . " [-biq] file ..."
.br
Execute commands from
.IR file .
@@ -625,6 +625,20 @@ is set for the duration to the remainder of the argument list following
.I File
is searched for using
.BR $path .
+The flags
+.B -b
+and
+.B -i
+can be set for the new commands
+(see description below).
+The
+.B -q
+flag suppresses errors,
+inhibiting the effect of
+.B -e
+and
+.B -v
+flags of the main interpreter.
.HP
.BI builtin " command ..."
.br
@@ -974,6 +988,10 @@ Print each simple command before executing it.
.B -r
Print debugging information (internal form of commands
as they are executed).
+.TP
+.B -b
+Compile the command file as a whole before executing.
+This allows syntax checking of the whole file.
.PD
.SH FILES
.TF $home/lib/profile
@@ -1004,6 +1022,4 @@ to check the value of
changes
.BR $status .
.PP
-Functions containing here documents don't work.
-.PP
Free carets don't get inserted next to keywords.