Copyright (C) 2000-2012 |
GNU Info (librep.info)InvocationInvocation ********** The `rep' program may be used to launch the stand-alone `librep' environment: usage: rep [REP-OPTIONS...] [SCRIPT [SCRIPT-OPTIONS...]] Where REP-OPTIONS may be any of the following: `--init FILE' Use FILE to boot the Lisp system from, instead of `init.jl'. `--version' Print the current version number and exit `--batch' Tell the interpreter that it is running non-interactively, this reduces the number of messages output to the console `--interp' Interpreted mode. Never load compiled Lisp files: this can be useful when using the debugger. `--no-rc' Don't load the user's `~/.reprc' script, or the `site-init.jl' script `-f FUNCTION' Invoke the Lisp function FUNCTION (with no arguments) `-l SCRIPT' Try to load the Lisp file SCRIPT, this is equivalent to evaluating the form `(load "SCRIPT")'. `-q' Terminate the Lisp process and exit. If SCRIPT is given, it names the Lisp file to load, equivalent to the `-l' option, except that `--batch-mode' is implied. Any SCRIPT-OPTIONS will be made available to the script (in the `command-line-args' variable). After any arguments have been processed a banner message will be displayed before entering an interactive read-eval-print loop, unless `--batch-mode' was specified, in which case the interpreter exits. The read-eval-print loop simply reads complete Lisp forms (Note: The Lisp Reader), evaluates them, before printing the result back to the console; this continues ad infinitum, or until you force an EOF (i.e. enter `C-d'). Implicitly Interpreting `rep' Scripts ..................................... The `rep' interpreter also supports automatic invocation of scripts, using the oeprating system's support for `#!' interpreter invocation (i.e. if the first line of an executable text file contains `#! PROG', the program PROG is used to execute the script. However there is a problem with this method, in that the `PATH' environment variable is not searched for the location of the interpreter, and thus the full file name of the interpreter program must be hard-coded into the script. To work around this problem `rep' supports a slightly different method of invocation. If the first two characters of a loaded Lisp file are `#!', then everything is treated as a comment until the first occurrence of the string `!#'. This allows the first part of the script to be executed as a shell script invoking the `rep' interpreter. What this means, is that you want to put something like the following at the start of any scripts you want to execute implicitly (and `chmod +x' the file as well): #!/bin/sh exec rep "$0" "$@" !# ;; Lisp code follows... automatically generated by info2www version 1.2.2.9 |