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

NAME

6       gosh - a Scheme script interpreter
7

SYNOPSIS

9       gosh  [-biqV]  [-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
24       details.   If  there's  no  main  procedure defined in the script, gosh
25       exits with code 0 after loading the script file.
26
27       If no script file is given, gosh goes into  an  interactive  mode.   By
28       default,  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       -i   Interactive mode.  Forces to print prompt, even the standard input
50            is not a terminal.
51
52       -q   Prevents reading the default initialization file.
53
54       -Ipath
55            Adds path in front of the load path list.
56
57       -Apath
58            Appends path to the tail of the load path list.
59
60       -umodule
61            Loads and imports module, as if "(use module )"  is  specified  in
62            the code.
63
64       -lfile
65            Loads a Scheme file file.
66
67       -Lfile
68            Like -l, but doesn't complain if file doesn't exist.
69
70       -eexpr
71            Evaluates a Scheme expression expr.
72
73       -Eexpr
74            Same as -e, except that the expr is read as if it is surrounded by
75            parenthesis.
76
77       -ptype
78            Turns on the profiler.  Type can be either 'time' or 'load'.
79
80       -mmodule
81            When the script file is given, this option specifies the  name  of
82            the  module in which the "main" procedure is defined.  The default
83            is "user".
84
85       -rstandard
86            Starts gosh with the default environment defined in RnRS, where  n
87            is  determined  by standard.  Currently, only 7 is the valid value
88            of standard.
89
90       -fflag
91            Sets various flags.
92              case-fold       use case-insensitive reader (as in R5RS)
93              load-verbose    report while loading files
94              include-verbose report while including files
95              no-inline       don't inline primitive procedures and constants
96                              (combined no-inline-globals, no-inline-locals,
97                              no-inline-constants and no-inline-setters.)
98              no-inline-globals don't inline global procedures.
99              no-inline-locals  don't inline local procedures.
100              no-inline-constants don't inline constants.
101              no-inline-setters don't inline setters.
102              no-post-inline-pass don't run post-inline optimization pass.
103              no-lambda-lifting-pass don't  run  lambda  lifting  optimization
104            pass.
105              no-source-info  don't retain source information.
106              warn-legacy-syntax print warning when legacy Gauche syntax
107                              is encountered.
108              test            assume being run in the build tree; tries to
109                              load files from the current build instead of
110                              installation directories.  Useful to test
111                              the build without installation.
112
113       -Ffeature
114            Makes feature available in cond-expand forms.
115
116       --   Specifies that there are no more options.  If there are more argu‐
117            ments after this, they are taken as script file name and its argu‐
118            ments.
119
120

ENVIRONMENT

122       GAUCHE_LOAD_PATH
123       A colon separated list of the load paths.
124              The paths are appended before the system default load paths.
125
126       GAUCHE_DYNLOAD_PATH
127       A colon separated list of the load paths for dynamically loaded
128              objects.   The paths are appended before the system default load
129              paths.
130
131

AUTHORS

133       Shiro Kawai (shiro @ acm . org)
134
135

SEE ALSO

137       gauche-config(1)
138
139       Gauche Scheme script engine:
140       https://practical-scheme.net/gauche/
141
142       For the information about Scheme language, see
143       https://www.schemers.org/
144
145
146
147
148Gauche 0.9.9                                                           GOSH(1)
Impressum