1GOSH(1)                         Gauche Commands                        GOSH(1)
2
3
4

NAME

6       gosh - a Scheme script interpreter
7

SYNOPSIS

9       gosh  [-bhiqV] [-I path ] [-A path ] [-u module ] [-l file ] [-L file ]
10       [-e expr ] [-E expr ] [-m module ] [-f flag ] [-F feature ] [-p type  ]
11       [-r standard ] [--] [ script argument ...  ]
12

DESCRIPTION

14       Gosh  is  a  stand-alone  Scheme interpreter built on top of the Gauche
15       Scheme script engine.
16
17       When script is given, gosh loads the script, evaluating Scheme code  in
18       it.   Then, if the script defines a procedure named main, gosh calls it
19       with a single argument which is a list of the script  name  and  subse‐
20       quent  arguments.   When main returns an integer value, gosh exits with
21       it as an exit code.  If main returns non-integer value, or an error  is
22       signaled during evaluation, gosh exits with exit code 70 (EX_SOFTWARE).
23       See  SRFI-22  (http://srfi.schemers.org/srfi-22/srfi-22.html)  for  de‐
24       tails.   If there's no main procedure defined in the script, gosh exits
25       with code 0 after loading the script file.
26
27       If no script file is given, gosh goes into an interactive mode.  By de‐
28       fault,  gosh  prompts  the  user to enter a Scheme expression, read and
29       evaluates it, then prints the result, until EOF is read.  If the  stan‐
30       dard  input is not a terminal, however, gosh doesn't print a prompt; it
31       allows a user to use gosh as a filter program.  This  behavior  can  be
32       controlled by -i or -b option; see below.
33
34

OPTIONS

36       Command  line  options  are processed before loading the script file or
37       entering the interactive mode.
38
39       The options -I, -A, -u, -l, -L, -e and -E are processed in the order of
40       appearance.   For  example, adding a load path by -I option affects the
41       -l options after it, but not the ones before it.
42
43
44       -V   Prints gosh version and exits.
45
46       -b   Batch mode.  Doesn't print prompt even the  standard  input  is  a
47            terminal.  Supersedes -i.
48
49       -h   Print help message to stdout and exit with 0.
50
51       -i   Interactive mode.  Forces to print prompt, even the standard input
52            is not a terminal.
53
54       -q   Prevents reading the default initialization file.
55
56       -Ipath
57            Adds path in front of the load path list.
58
59       -Apath
60            Appends path to the tail of the load path list.
61
62       -umodule
63            Loads and imports module, as if "(use module )"  is  specified  in
64            the code.
65
66       -lfile
67            Loads a Scheme file file.
68
69       -Lfile
70            Like -l, but doesn't complain if file doesn't exist.
71
72       -eexpr
73            Evaluates a Scheme expression expr.
74
75       -Eexpr
76            Same as -e, except that the expr is read as if it is surrounded by
77            parenthesis.
78
79       -mmodule
80            When the script file is given, this option specifies the  name  of
81            the  module in which the "main" procedure is defined.  The default
82            is "user".
83
84       -ptype
85            Turns on the profiler.  Type can be either 'time' or 'load'.
86
87       -rstandard
88            Starts gosh with the default environment defined in RnRS, where  n
89            is  determined  by standard.  Currently, only 7 is the valid value
90            of standard.
91
92       -vversion
93            If version is not the running Gauche's version, but the  specified
94            verision  is  installed in the system, execute taht version's gosh
95            instead.  This is useful when you want to invoke a  specific  ver‐
96            sion of Gauche.  The version must be 0.9.6 or later.
97
98       -fflag
99            Sets various flags.
100              case-fold       use case-insensitive reader (as in R5RS)
101              load-verbose    report while loading files
102              include-verbose report while including files
103              no-inline       don't inline primitive procedures and constants
104                              (combined no-inline-globals, no-inline-locals,
105                              no-inline-constants and no-inline-setters.)
106              no-inline-globals don't inline global procedures.
107              no-inline-locals  don't inline local procedures.
108              no-inline-constants don't inline constants.
109              no-inline-setters don't inline setters.
110              no-post-inline-pass don't run post-inline optimization pass.
111              no-lambda-lifting-pass  don't  run  lambda  lifting optimization
112            pass.
113              no-post-inline-pass  don't run post-inline optimization pass.
114              no-source-info  don't retain source information.
115              read-edit       enable input editing mode, if terminal  supports
116            it.
117              no-read-edit    disable input editing mode.
118              safe-string-cursors  performs extra validation for use of string
119            cursors.
120              warn-legacy-syntax print warning when legacy Gauche syntax
121                              is encountered.
122              test            assume being run in the build tree; tries to
123                              load files from the current build instead of
124                              installation directories.  Useful to test
125                              the build without installation.
126
127       -Ffeature
128            Makes feature available in cond-expand forms.
129
130       --   Specifies that there are no more options.  If there are more argu‐
131            ments after this, they are taken as script file name and its argu‐
132            ments.
133
134

ENVIRONMENT

136       GAUCHE_LOAD_PATH
137       A colon separated list of the load paths.
138              The paths are appended before the system default load paths.
139
140       GAUCHE_DYNLOAD_PATH
141       A colon separated list of the load paths for dynamically loaded
142              objects.  The paths are appended before the system default  load
143              paths.
144
145

AUTHORS

147       Shiro Kawai (shiro @ acm . org)
148
149

SEE ALSO

151       gauche-config(1)
152
153       Gauche Scheme script engine:
154       https://practical-scheme.net/gauche/
155
156       For the information about Scheme language, see
157       https://www.schemers.org/
158
159
160
161Gauche 0.9.12                                                          GOSH(1)
Impressum