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 ] [-e expr ]
10       [-E expr ] [-f flag ] [--] [ script argument ...  ]
11

DESCRIPTION

13       Gosh is a stand-alone Scheme interpreter built on  top  of  the  Gauche
14       Scheme script engine.
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

OPTIONS

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, -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       -Lfile
67            Like -l, but doesn't complain if file doesn't exist.
68
69       -eexpr
70            Evaluates a Scheme expression expr.
71
72       -Eexpr
73            Same as -e, except that the expr is read as if it is surrounded by
74            parenthesis.
75
76       -ptype
77            Turns on the profiler.  Currently type can only be 'time'.
78
79       -fflag
80            Sets various flags.
81              case-fold       uses case-insensitive reader (as in R5RS)
82              load-verbose    report while loading files
83              no-inline       don't inline primitive procedures and constants
84                              (combined  no-inline-globals,  no-inline-locals,
85            and
86                              no-inline-constants.)
87              no-inline-globals don't inline global procedures.
88              no-inline-locals  don't inline local procedures.
89              no-inline-constants don't inline constants.
90              no-post-inline-pass don't run post-inline optimization pass.
91
92       -Ffeature
93            Makes feature available in cond-expand forms.
94
95       --   Specifies that there are no more options.  If there are more argu‐
96            ments after this, they are taken as script file name and its argu‐
97            ments.
98
99

ENVIRONMENT

101       GAUCHE_LOAD_PATH
102       A colon separated list of the load paths.
103              The paths are appended before the system default load paths.
104
105       GAUCHE_DYNLOAD_PATH
106       A colon separated list of the load paths for dynamically loaded
107              objects.  The paths are appended before the system default  load
108              paths.
109
110

AUTHORS

112       Shiro Kawai (shiro @ acm . org)
113
114

SEE ALSO

116       gauche-config(1)
117
118       Gauche Scheme script engine:
119       http://practical-scheme.net/gauche/
120
121       For the information about Scheme language, see
122       http://www.schemers.org/
123
124
125
126
127Gauche 0.9.2                                                           GOSH(1)
Impressum