The main step in running code is the execution of the run command. The run command is simply a shell command with some environment variables set.
Use the environment variables $filename
and $compiler
(if applicable) in the run command. For a list of environment variables that are available, see Environment Variables.
For interpreted languages, invoking the run command is the only step involved when running code. Typically, the run command simply invokes the interpreter and passes the file to be run as an argument. For example, if the interpreter is called python
, the run command is python $filename
.
For compiled languages, a compile script is invoked before the run command. The final line of output from the compile script is made available to the run command using the $compiler
environment variable.
Commonly the $compiler
environment variable contains the absolute path to the binary file that was produced by the compiler. In such a case, the run command only needs to execute this compiled binary, so the run command is simply $compiler
.
Command line arguments may be specified in
. Under the hood, these arguments are appended to the run command, and are not subject to shell expansion. If you want to pass arguments that are expended by the shell, you can edit the run command directly.Input to be run command may be specified in
. If the input is non-empty, it is piped to the run command using stdin.