1.0.21.17: --script commandline argument
[sbcl.git] / doc / sbcl.1
index dc08b93..5776d61 100644 (file)
@@ -107,9 +107,7 @@ Gray streams (a de-facto standard system of overloadable CLOS classes
 whose instances can be used wherever ordinary ANSI streams can be used)
 .TP 3
 \--
-weak pointers and finalization (which have unfortunately
-suffered from at least some code rot, so that \fIe.g.\fR weak hash
-tables don't work)
+weak pointers and finalization
 .PP
 
 Fundamental system interface extensions are also provided:
@@ -271,6 +269,11 @@ startup. (This makes it easier to write Lisp programs which work
 cleanly in Unix pipelines. See also the "\-\-noprint" and
 "\-\-disable\-debugger" options.)
 .TP 3
+.B \-\-script <filename>
+As a runtime option equivalent to \-\-noinform
+\-\-end\-toplevel\-options \-\-script <filename>. See the description
+of \-\-script as a toplevel option below.
+.TP 3
 .B \-\-help
 Print some basic information about SBCL, then exit.
 .TP 3
@@ -322,30 +325,40 @@ makes it easier to write Lisp "scripts" which work cleanly in Unix
 pipelines.
 .TP 3
 .B \-\-disable\-debugger
-This is equivalent to \-\-eval \(aq(sb\-ext:disable\-debugger)\(aq. By
-default, a Common Lisp system tries to ask the programmer for help
-when it gets in trouble (by printing a debug prompt, then listening,
-on \f(CR*DEBUG\-IO*\fR). However, this is not useful behavior for a system
-running with no programmer available, and this option tries to set up
-more appropriate behavior for that situation. This is implemented by
-redefining \f(CRINVOKE\-DEBUGGER\fR so that any call exits the process with a
-failure code after printing a backtrace. (Note that because it is
-implemented by modifying special variables and \f(CRFDEFINITION\fRs, its
-effects persist in .core files created by
-\f(CRSB\-EXT:SAVE\-LISP\-AND\-DIE\fR.  If you want to undo its
-effects, \fIe.g.\fR if you build a system unattended and then want to
-operate a derived system interactively, see the
-\f(CRSB\-EXT:ENABLE\-DEBUGGER\fR command.)
+By default when SBCL encounters an error, it enters the builtin
+debugger, allowing interactive diagnosis and possible intercession.
+This option disables the debugger, causing errors to print a backtrace
+and exit with status 1 instead -- which is a mode of operation better suited
+for batch processing. See the user manual on \f(CRSB\-EXT:DISABLE\-DEBUGGER\fR for details.
+.B \-\-script <filename>
+Implies \-\-no-sysinit \-\-no-userinit \-\-disable-debugger
+\-\-end\-toplevel\-options.
+
+Causes the system to load the specified file and exit immediately
+afterwards, instead of entering the readl-eval-print loop. If the file
+begins with a shebang line, it is ignored.
+.PP
+
+Regardless of the order in which toplevel options appear on the command
+line, the order of actions is:
+
+.nr step 1 1
+.IP \n[step]. 3
+Debugger is disabled, if requested.
+.IP \n+[step].
+Any system initialization file is loaded, unless prohibited.
+.IP \n+[step].
+Any user initialization file is loaded, unless prohibited.
+.IP \n+[step].
+\-\-eval and \-\-load options are processed in the order given.
 .PP
 
-Regardless of the order in which \-\-sysinit, \-\-userinit, and
-\-\-eval options appear on the command line, the sysinit file, if it
-exists, is loaded first; then the userinit file, if it exists, is
-loaded; then any \-\-eval commands are read and executed in sequence;
-then the read-eval-print loop is started on standard input. At any
-step, error conditions or commands such as \f(CRSB\-EXT:QUIT\fR can
-cause execution to be terminated before proceeding to subsequent
-steps.
+Finally, either the read-eval-print loop is entered or the file
+specified with \-\-script option is loaded.
+
+When running in the read-eval-print loop the system exits on end of
+file. Similarly, the system exits immediately after processing the
+file specified with \-\-script.
 
 Note that when running SBCL with the \-\-core option, using a core
 file created by a user call to the