Rune

From Erights

(Difference between revisions)
Jump to: navigation, search
(Setting up rune)
(Initial saving)
Line 1: Line 1:
-
Rune is the interactive command line interpreter for E code.
+
Rune is the 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.
+
== Starting rune under windows ==
 +
Go to the E directory and look for a file called rune.bat.
 +
If it does not exist, copy the file rune-bat-template.txt to rune.bat and edit the settings in the file.
 +
When the settings are correct, you should be able to start rune by double-clicking the .bat icon.
-
''Hint:'' If you plan on using rune a lot, you should try [http://sourceforge.net/projects/console Console], a Windows console window enhancement
+
== Starting rune under linux/unix/mac ==
-
 
+
Go to the E directory and look for a file called rune
-
'''unix/linux/mac/cygwin:''' Copy <code>rune-template.txt</code> to <code>rune</code> and edit it.
+
If it does not exist, copy the file rune-template.txt to rune and edit the settings in the file.
-
Add execute rights to the file by entering <code>chmod a+x rune</code>.
+
Add execute rights to the file by executing the shell command <code>chmod a+x rune</code>
-
 
+
When the settings are correct, you should be able to start rune with the command <code>./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 several ways to start an E script using rune.
+
-
 
+
-
=== Calling the "rune" script explicitly ===
+
-
 
+
-
Given that the "rune" script is on your PATH, you can give the name of the .e script as a command line argument to rune:
+
-
 
+
-
<code>$ rune [options...] example.e [args...]</code>
+
-
 
+
-
The additional args after <code>example.e</code> are available from within <code>example.e</code> as the value of the expression
+
-
 
+
-
<code>interp.getArgs()</code>
+
-
 
+
-
For more information on the options, do
+
-
 
+
-
<code>$ rune --help</code>
+
-
 
+
-
=== Calling the "rune" shell script implicitly ===
+
-
 
+
-
On the unix/linux/mac/cygwin platforms, you can place <code>#!/usr/bin/env rune</code> on the first line of example.e, make example.e executable, and use it directly as a command:
+
-
 
+
-
<code>$ example.e [args...]</code>
+
-
 
+
-
On cygwin, text files beginning with a "#!" are automatically considered executable.
+
-
 
+
-
=== Calling the "rune" function from within a running E system ===
+
-
 
+
-
You can start the script directly from the E command prompt, which can save some time because the running Java VM is used:
+
-
 
+
-
<code>? rune(["example.e"])</code>
+
-
 
+
-
=== Launching from the desktop ===
+
-
 
+
-
Currently on Windows only, you can double click on the shortcut icon for <code>example.e</code> in the file explorer (desktop).
+
-
 
+
-
== 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 13:54, 15 March 2007

Rune is the command line interpreter for E code.


Starting rune under windows

Go to the E directory and look for a file called rune.bat. If it does not exist, copy the file rune-bat-template.txt to rune.bat and edit the settings in the file. When the settings are correct, you should be able to start rune by double-clicking the .bat icon.

Starting rune under linux/unix/mac

Go to the E directory and look for a file called rune If it does not exist, copy the file rune-template.txt to rune and edit the settings in the file. Add execute rights to the file by executing the shell command chmod a+x rune When the settings are correct, you should be able to start rune with the command ./rune

Personal tools
more tools