1GOSH(version 0.8.11) GOSH(version 0.8.11)
2
3
4
6 gosh - a Scheme script interpreter
7
9 gosh [-biqV] [-I path ] [-A path ] [-u module ] [-l file ] [-e expr ]
10 [-E expr ] [-f flag ] [--] [ script argument ... ]
11
13 Gosh is a stand-alone Scheme interpreter built on top of the Gauche
14 Scheme implementation.
15
16 When script is given, gosh loads the script, evaluating Scheme code in
17 it. Then, if the script defines a procedure named main, gosh calls it
18 with a single argument which is a list of the script name and subse‐
19 quent arguments. When main returns an integer value, gosh exits with
20 it as an exit code. If main returns non-integer value, or an error is
21 signaled during evaluation, gosh exits with exit code 70 (EX_SOFTWARE).
22 See SRFI-22 (http://srfi.schemers.org/srfi-22/srfi-22.html) for
23 details. If there's no main procedure defined in the script, gosh
24 exits with code 0 after loading the script file.
25
26 If no script file is given, gosh goes into an interactive mode. By
27 default, gosh prompts the user to enter a Scheme expression, read and
28 evaluates it, then prints the result, until EOF is read. If the stan‐
29 dard input is not a terminal, however, gosh doesn't print a prompt; it
30 allows a user to use gosh as a filter program. This behavior can be
31 controlled by -i or -b option; see below.
32
33
35 Command line options are processed before loading the script file or
36 entering the interactive mode.
37
38 The options -I, -A, -u, -l, -e and -E are processed in the order of
39 appearance. For example, adding a load path by -I option affects the
40 -l options after it, but not the ones before it.
41
42
43 -V Prints gosh version and exits.
44
45 -b Batch mode. Doesn't print prompt even the standard input is a
46 terminal. Supersedes -i.
47
48 -i Interactive mode. Forces to print prompt, even the standard input
49 is not a terminal.
50
51 -q Prevents reading the default initialization file.
52
53 -Ipath
54 Adds path in front of the load path list.
55
56 -Apath
57 Appends path to the tail of the load path list.
58
59 -umodule
60 Loads and imports module, as if "(use module )" is specified in
61 the code.
62
63 -lfile
64 Loads a Scheme file file.
65
66 -eexpr
67 Evaluates a Scheme expression expr.
68
69 -Eexpr
70 Same as -e, except that the expr is read as if it is surrounded by
71 parenthesis.
72
73 -fflag
74 Sets various flags.
75 no-inline don't inline primitive procedures
76 no-source-info don't preserve source information for debug
77 load-verbose report while loading files
78 case-fold uses case-insensitive reader (as in R5RS)
79
80 -- Specifies that there are no more options. If there are more argu‐
81 ments after this, they are taken as script file name and its argu‐
82 ments.
83
84
86 GAUCHE_LOAD_PATH
87 A colon separated list of the load paths.
88 The paths are appended before the system default load paths.
89
90 GAUCHE_DYNLOAD_PATH
91 A colon separated list of the load paths for dynamically loaded
92 objects. The paths are appended before the system default load
93 paths.
94
95
97 Shiro Kawai (shiro @ acm . org)
98
99
101 gauche-config(1)
102
103 Gauche Scheme interpreter:
104 http://practical-scheme.net/gauche/
105
106 For the information about Scheme language, see
107 http://www.schemers.org/
108
109
110
111
1124th Berkeley Distribution GOSH(version 0.8.11)