Ergebnis für URL: http://www.gnu.org/software/guile/manual/html_node/Command_002dline-Options.html#index-_002eguile-file_002c-not-loading #[1]Top [2]Concept Index [3]Table of Contents [4]Invoking Guile [5]Environment
Variables
Next: [6]Environment Variables, Up: [7]Invoking Guile [[8]Contents][[9]Index]
____________________________________________________________________________
4.2.1 Command-line Options
Here we describe Guile's command-line processing in detail. Guile processes its
arguments from left to right, recognizing the switches described below. For
examples, see [10]Scripting Examples.
script arg...[11] ¶
-s script arg...
By default, Guile will read a file named on the command line as a script.
Any command-line arguments arg... following script become the script's
arguments; the command-line function returns a list of strings of the form
(script arg...).
It is possible to name a file using a leading hyphen, for example,
-myfile.scm. In this case, the file name must be preceded by -s to tell
Guile that a (script) file is being named.
Scripts are read and evaluated as Scheme source code just as the load
function would. After loading script, Guile exits.
-c expr arg...[12] ¶
Evaluate expr as Scheme code, and then exit. Any command-line arguments
arg... following expr become command-line arguments; the command-line
function returns a list of strings of the form (guile arg...), where guile
is the path of the Guile executable.
-- arg...
Run interactively, prompting the user for expressions and evaluating them.
Any command-line arguments arg... following the -- become command-line
arguments for the interactive session; the command-line function returns a
list of strings of the form (guile arg...), where guile is the path of the
Guile executable.
-L directory
Add directory to the front of Guile's module load path. The given
directories are searched in the order given on the command line and before
any directories in the GUILE_LOAD_PATH environment variable. Paths added
here are not in effect during execution of the user's .guile file.
-C directory
Like -L, but adjusts the load path for compiled files.
-x extension
Add extension to the front of Guile's load extension list (see
[13]%load-extensions). The specified extensions are tried in the order
given on the command line, and before the default load extensions.
Extensions added here are not in effect during execution of the user's
.guile file.
-l file
Load Scheme source code from file, and continue processing the command
line.
-e function
Make function the entry point of the script. After loading the script file
(with -s) or evaluating the expression (with -c), apply function to a list
containing the program name and the command-line arguments--the list
provided by the command-line function.
A -e switch can appear anywhere in the argument list, but Guile always
invokes the function as the last action it performs. This is weird, but
because of the way script invocation works under POSIX, the -s option must
always come last in the list.
The function is most often a simple symbol that names a function that is
defined in the script. It can also be of the form (@ module-name symbol),
and in that case, the symbol is looked up in the module named module-name.
As a shorthand you can use the form (symbol ...), that is, a list of only
symbols that doesn't start with @. It is equivalent to (@ module-name
main), where module-name is (symbol ...) form. See [14]Using Guile Modules
and [15]Scripting Examples.
-ds
Treat a final -s option as if it occurred at this point in the command
line; load the script here.
This switch is necessary because, although the POSIX script invocation
mechanism effectively requires the -s option to appear last, the
programmer may well want to run the script before other actions requested
on the command line. For examples, see [16]Scripting Examples.
\
Read more command-line arguments, starting from the second line of the
script file. See [17]The Meta Switch.
--use-srfi=list[18] ¶
The option --use-srfi expects a comma-separated list of numbers, each
representing a SRFI module to be loaded into the interpreter before
evaluating a script file or starting the REPL. Additionally, the feature
identifier for the loaded SRFIs is recognized by the procedure cond-expand
when this option is used.
Here is an example that loads the modules SRFI-8 ('receive') and SRFI-13
('string library') before the GUILE interpreter is started:
guile --use-srfi=8,13
--r6rs[19] ¶
Adapt Guile's initial environment to better support R6RS. See
[20]Incompatibilities with the R6RS, for some caveats.
--r7rs[21] ¶
Adapt Guile's initial environment to better support R7RS. See
[22]Incompatibilities with the R7RS, for some caveats.
--debug[23] ¶
Start with the debugging virtual machine (VM) engine. Using the debugging
VM will enable support for VM hooks, which are needed for tracing,
breakpoints, and accurate call counts when profiling. The debugging VM is
slower than the regular VM, though, by about ten percent. See [24]VM
Hooks, for more information.
By default, the debugging VM engine is only used when entering an
interactive session. When executing a script with -s or -c, the normal,
faster VM is used by default.
--no-debug[25] ¶
Do not use the debugging VM engine, even when entering an interactive
session.
Note that, despite the name, Guile running with --no-debug does support
the usual debugging facilities, such as printing a detailed backtrace upon
error. The only difference with --debug is lack of support for VM hooks
and the facilities that build upon it (see above).
-q[26] ¶
Do not load the initialization file, .guile. This option only has an
effect when running interactively; running scripts does not load the
.guile file. See [27]The Init File, ~/.guile.
--listen[=p]
While this program runs, listen on a local port or a path for REPL
clients. If p starts with a number, it is assumed to be a local port on
which to listen. If it starts with a forward slash, it is assumed to be
the file name of a UNIX domain socket on which to listen.
If p is not given, the default is local port 37146. If you look at it
upside down, it almost spells "Guile". If you have netcat installed, you
should be able to nc localhost 37146 and get a Guile prompt. Alternately
you can fire up Emacs and connect to the process; see [28]Using Guile in
Emacs for more details.
Note: Opening a port allows anyone who can connect to that port to do anything
Guile can do, as the user that the Guile process is running as. Do not use
--listen on multi-user machines. Of course, if you do not pass --listen to
Guile, no port will be opened.
Guile protects against the [29]HTTP inter-protocol exploitation attack, a
scenario whereby an attacker can, via an HTML page, cause a web browser to
send data to TCP servers listening on a loopback interface or private network.
Nevertheless, you are advised to use UNIX domain sockets, as in
--listen=/some/local/file, whenever possible.
That said, --listen is great for interactive debugging and development.
--auto-compile
Compile source files automatically (default behavior).
--fresh-auto-compile
Treat the auto-compilation cache as invalid, forcing recompilation.
--no-auto-compile
Disable automatic source file compilation.
--language=lang
For the remainder of the command line arguments, assume that files
mentioned with -l and expressions passed with -c are written in lang. lang
must be the name of one of the languages supported by the compiler (see
[30]Compiler Tower). When run interactively, set the REPL's language to
lang (see [31]Using Guile Interactively).
The default language is scheme; other interesting values include elisp
(for Emacs Lisp), and ecmascript.
The example below shows the evaluation of expressions in Scheme, Emacs
Lisp, and ECMAScript:
guile -c "(apply + '(1 2))"
guile --language=elisp -c "(= (funcall (symbol-function '+) 1 2) 3)"
guile --language=ecmascript -c '(function (x) { return x * x; })(2);'
To load a file written in Scheme and one written in Emacs Lisp, and then
start a Scheme REPL, type:
guile -l foo.scm --language=elisp -l foo.el --language=scheme
-h, --help
Display help on invoking Guile, and then exit.
-v, --version
Display the current version of Guile, and then exit.
____________________________________________________________________________
Next: [32]Environment Variables, Up: [33]Invoking Guile
[[34]Contents][[35]Index]
References
1. http://www.gnu.org/software/guile/manual/html_node/index.html
2. http://www.gnu.org/software/guile/manual/html_node/Concept-Index.html
3. http://www.gnu.org/software/guile/manual/html_node/index.html#SEC_Contents
4. http://www.gnu.org/software/guile/manual/html_node/Invoking-Guile.html
5. http://www.gnu.org/software/guile/manual/html_node/Environment-Variables.html
6. http://www.gnu.org/software/guile/manual/html_node/Environment-Variables.html
7. http://www.gnu.org/software/guile/manual/html_node/Invoking-Guile.html
8. http://www.gnu.org/software/guile/manual/html_node/index.html#SEC_Contents
9. http://www.gnu.org/software/guile/manual/html_node/Concept-Index.html
10. http://www.gnu.org/software/guile/manual/html_node/Scripting-Examples.html
11. http://www.gnu.org/software/guile/manual/html_node/Command_002dline-Options.html#index-script-mode
12. http://www.gnu.org/software/guile/manual/html_node/Command_002dline-Options.html#index-evaluate-expression_002c-command_002dline-argument
13. http://www.gnu.org/software/guile/manual/html_node/Load-Paths.html
14. http://www.gnu.org/software/guile/manual/html_node/Using-Guile-Modules.html
15. http://www.gnu.org/software/guile/manual/html_node/Scripting-Examples.html
16. http://www.gnu.org/software/guile/manual/html_node/Scripting-Examples.html
17. http://www.gnu.org/software/guile/manual/html_node/The-Meta-Switch.html
18. http://www.gnu.org/software/guile/manual/html_node/Command_002dline-Options.html#index-loading-srfi-modules-_0028command-line_0029
19. http://www.gnu.org/software/guile/manual/html_node/Command_002dline-Options.html#index-r6rs-_0028command-line_0029
20. http://www.gnu.org/software/guile/manual/html_node/R6RS-Incompatibilities.html
21. http://www.gnu.org/software/guile/manual/html_node/Command_002dline-Options.html#index-r7rs-_0028command-line_0029
22. http://www.gnu.org/software/guile/manual/html_node/R7RS-Incompatibilities.html
23. http://www.gnu.org/software/guile/manual/html_node/Command_002dline-Options.html#index-debugging-virtual-machine-_0028command-line_0029
24. http://www.gnu.org/software/guile/manual/html_node/VM-Hooks.html
25. http://www.gnu.org/software/guile/manual/html_node/Command_002dline-Options.html#index-debugging-virtual-machine-_0028command-line_0029-1
26. http://www.gnu.org/software/guile/manual/html_node/Command_002dline-Options.html#index-init-file_002c-not-loading
27. http://www.gnu.org/software/guile/manual/html_node/Init-File.html
28. http://www.gnu.org/software/guile/manual/html_node/Using-Guile-in-Emacs.html
29. https://en.wikipedia.org/wiki/Inter-protocol_exploitation
30. http://www.gnu.org/software/guile/manual/html_node/Compiler-Tower.html
31. http://www.gnu.org/software/guile/manual/html_node/Using-Guile-Interactively.html
32. http://www.gnu.org/software/guile/manual/html_node/Environment-Variables.html
33. http://www.gnu.org/software/guile/manual/html_node/Invoking-Guile.html
34. http://www.gnu.org/software/guile/manual/html_node/index.html#SEC_Contents
35. http://www.gnu.org/software/guile/manual/html_node/Concept-Index.html
Usage: http://www.kk-software.de/kklynxview/get/URL
e.g. http://www.kk-software.de/kklynxview/get/http://www.kk-software.de
Errormessages are in German, sorry ;-)