Rune
From Erights
(Initial saving) |
|||
Line 1: | Line 1: | ||
- | Rune is the command line interpreter for E code. | + | Rune is the interactive command line interpreter for E code. |
+ | == Setting up rune == | ||
- | + | '''Windows:''' Copy the file <code>rune-bat-template.txt</code> to <code>rune.bat</code> and edit the settings in the file. | |
- | + | ||
- | + | ||
- | + | ||
- | + | '''unix/linux/mac:''' Copy <code>rune-template.txt</code> to <code>rune</code> and edit it. | |
- | + | Add execute rights to the file by executing the shell command <code>chmod a+x rune</code>. | |
- | + | ||
- | Add execute rights to the file by executing the shell command <code>chmod a+x rune</code> | + | You should now be able to execute rune and get an interactive shell. |
- | + | ||
+ | As an alternative, rune can be started using the java executable: | ||
+ | <code> | ||
+ | java -jar e.jar --rune | ||
+ | </code> | ||
+ | |||
+ | == Running an E script from rune == | ||
+ | |||
+ | There are two ways to start an E script using rune: | ||
+ | First, you can give the name of the script as a command line argument. | ||
+ | <code>./rune example.e</code> | ||
+ | |||
+ | The second way is to start the script from the E command prompt: | ||
+ | <code>? rune(["example.e"])</code> | ||
+ | The second method can be faster if you want to start a script more than once, for example for testing. The java virtual machine is only started once, which can save some seconds. | ||
+ | |||
+ | == Command history == | ||
+ | The interactive E interpreter does not provide command history. Under windows, the shell has its own command history, which can be used by pressing the up and down arrow keys. | ||
+ | If your system does not provide command history, you can try [http://freshmeat.net/projects/rlwrap/ RLWrap]. |
Revision as of 14:19, 15 March 2007
Rune is the interactive command line interpreter for E code.
Setting up rune
Windows: Copy the file rune-bat-template.txt
to rune.bat
and edit the settings in the file.
unix/linux/mac: Copy rune-template.txt
to rune
and edit it.
Add execute rights to the file by executing the shell command chmod a+x rune
.
You should now be able to execute rune and get an interactive shell.
As an alternative, rune can be started using the java executable:
java -jar e.jar --rune
Running an E script from rune
There are two ways to start an E script using rune:
First, you can give the name of the script as a command line argument.
./rune example.e
The second way is to start the script from the E command prompt:
? rune(["example.e"])
The second method can be faster if you want to start a script more than once, for example for testing. The java virtual machine is only started once, which can save some seconds.
Command history
The interactive E interpreter does not provide command history. Under windows, the shell has its own command history, which can be used by pressing the up and down arrow keys. If your system does not provide command history, you can try RLWrap.