
1: .\" $Id: gosh.1.in,v 1.4 2006/11/11 20:45:17 shirok Exp $ -*-nroff-*- 2: .TH GOSH "version @GAUCHE_VERSION@" 3: .UC 4 4: .SH NAME 5: gosh \- a Scheme script interpreter 6: .SH SYNOPSIS 7: .B gosh 8: [-biqV] 9: [-I 10: .I path 11: ] 12: [-A 13: .I path 14: ] 15: [-u 16: .I module 17: ] 18: [-l 19: .I file 20: ] 21: [-e 22: .I expr 23: ] 24: [-E 25: .I expr 26: ] 27: [-f 28: .I flag 29: ] 30: [--] 31: [ 32: .I script argument ... 33: ] 34: .br 35: .sp 0.3 36: .SH DESCRIPTION 37: .I Gosh 38: is a stand-alone Scheme interpreter built on top of the 39: .I Gauche 40: Scheme implementation. 41: 42: When 43: .I script 44: is given, gosh loads the script, evaluating Scheme code in it. 45: Then, if the 46: .I script 47: defines a procedure named 48: .I main, 49: gosh calls it with a single argument which is a list of 50: the script name and subsequent arguments. 51: When 52: .I main 53: returns an integer value, gosh exits with it as an exit code. 54: If 55: .I main 56: returns non-integer value, or an error is signaled during 57: evaluation, gosh exits with exit code 70 (EX_SOFTWARE). 58: See SRFI-22 (http://srfi.schemers.org/srfi-22/srfi-22.html) for 59: details. 60: If there's no 61: .I main 62: procedure defined in the script, gosh exits with code 0 63: after loading the script file. 64: 65: If no script file is given, gosh goes into an interactive mode. 66: By default, gosh prompts the user to enter a Scheme expression, 67: read and evaluates it, then prints the result, until EOF is read. 68: If the standard input is not a terminal, however, gosh doesn't 69: print a prompt; it allows a user to use gosh as a filter program. 70: This behavior can be controlled by -i or -b option; see below. 71: 72: .SH OPTIONS 73: Command line options are processed before loading the script file 74: or entering the interactive mode. 75: 76: The options -I, -A, -u, -l, -e and -E are processed in the order 77: of appearance. For example, adding a load path by -I option 78: affects the -l options after it, but not the ones before it. 79: 80: .TP 5 81: .BI -V 82: Prints gosh version and exits. 83: .TP 84: .BI -b 85: Batch mode. Doesn't print prompt even the standard input 86: is a terminal. Supersedes -i. 87: .TP 88: .BI -i 89: Interactive mode. Forces to print prompt, even the standard input 90: is not a terminal. 91: .TP 92: .BI -q 93: Prevents reading the default initialization file. 94: .TP 95: .BI -I path 96: Adds 97: .I path 98: in front of the load path list. 99: .TP 100: .BI -A path 101: Appends 102: .I path 103: to the tail of the load path list. 104: .TP 105: .BI -u module 106: Loads and imports 107: .I module, 108: as if "(use 109: .I module 110: )" is specified in the code. 111: .TP 112: .BI -l file 113: Loads a Scheme file 114: .I file. 115: .TP 116: .BI -e expr 117: Evaluates a Scheme expression 118: .I expr. 119: .TP 120: .BI -E expr 121: Same as -e, except that the 122: .I expr 123: is read as if it is surrounded by parenthesis. 124: .TP 125: .BI -f flag 126: Sets various flags. 127: no-inline don't inline primitive procedures 128: no-source-info don't preserve source information for debug 129: load-verbose report while loading files 130: case-fold uses case-insensitive reader (as in R5RS) 131: .TP 132: .BI -- 133: Specifies that there are no more options. If there are more 134: arguments after this, they are taken as script file name and 135: its arguments. 136: 137: .SH ENVIRONMENT 138: .TP 139: .B GAUCHE_LOAD_PATH 140: .TQ 141: A colon separated list of the load paths. 142: The paths are appended before the system default load paths. 143: .TP 144: .B GAUCHE_DYNLOAD_PATH 145: .TQ 146: A colon separated list of the load paths for dynamically loaded 147: objects. 148: The paths are appended before the system default load paths. 149: 150: .SH AUTHORS 151: Shiro Kawai (shiro @ acm . org) 152: 153: .SH SEE ALSO 154: gauche-config(1) 155: .PP 156: Gauche Scheme interpreter: 157: .br 158: http://practical-scheme.net/gauche/ 159: .PP 160: For the information about Scheme language, see 161: .br 162: http://www.schemers.org/ 163: