Next: , Previous: Specifying Mailboxes to Operate Upon, Up: guimb


Passing Options to Scheme

Sometimes it is necessary to pass some command line options to the scheme procedure. There are three ways of doing so.

When using --source (-s) or --code (-c) options, all the rest of the command line following the option's argument is passed to Scheme program verbatim. This allows for making guimb scripts executable by the shell. If your system supports ‘#!’ magic at the start of scripts, add the following two lines to the beginning of your script to allow for its immediate execution:

     #! /usr/local/bin/guimb -s
     !#

(replace ‘/usr/local/bin/’ with the actual path to the guimb).

Otherwise, if you use --file or --expression options, the additional arguments may be passed to the Scheme program -g (--guile-arg) command line option. For example:

     guimb --guile-arg -opt --guile-arg 24 --file progfile

In this example, the scheme procedure will see the following command line:

     progfile -opt 24

Finally, if there are many arguments to be passed to Scheme, it is more convenient to enclose them in -{ and -} escapes:

     guimb -{ -opt 24 -} --file progfile