OpenDRO User's Guide

8.2 Lua Shell

The automation interface incorporates an advanced shell with many of the features commonly found on Unix and Windows command line interfaces.  This includes editing control keys, command history, and tab completion.  The shell displays an 'OpenDRO>' prompt to let you know that it is ready to accept a command.  If you enter an incomplete command, then the shell will display 'OpenDRO>>' to let you know more input is required.  For example:

OpenDRO> print(
OpenDRO>> 'hello'
OpenDRO>> )
hello
OpenDRO>

8.2.1 Editing

The command line editing operations are summarized below.  If your terminal software is configured for VT100 operation, which most are, then the keys on your keyboard shown below should work.  You can also use the control key combination shown to achieve the same result.

Key Control Description
Left Arrow Ctrl-B Move the cursor one position to the left.
Right Arrow Ctrl-F Move the cursor one position to the right.
Home Ctrl-A Move the cursor to the beginning of the line.
End Ctrl-E Move the cursor to the end of the line.
Backspace Ctrl-H Delete one character to the left of the cursor.
- Ctrl-K Delete everything from the cursor to the end of the line.
- Ctrl-U Delete the entire line.

 

8.2.2 History

The shell remembers the last ten commands you execute so you can easily recall them.  To do this, press the keys shown below.  When reaching the top or bottom of the command history, the shell will beep.

Key Control Description
Up Arrow Ctrl-P Recall the previous command line.
Down Arrow Ctrl-N Recall the next command line.

 

8.2.3 Completion

The tab key, or Ctrl-I, will perform command completion at the current cursor position.  This fills in the command line in with the remainder of the name typed up to that point or a list of possible completions if the name typed is ambiguous.  If there is no possible completion, then the shell will beep.  For example, if you type 's' and then press tab, you will see a list of possible completions since 's' is ambiguous:

OpenDRO> s
string system scale sd select setfenv setmetatable
OpenDRO> s

If you then type a 'c' after the 's' and press tab again, then the completion of 'scale' is filled in:

OpenDRO> scale

Now type a '.' for access to the scale object and then press tab again.  You will see a list of the possible scale methods:

OpenDRO> scale.
count cpi show
OpenDRO> scale.

Now type an 's', press tab, and 'show' is filled in:

OpenDRO> scale.show

Add the scale number '1' inside a set of parentheses and press enter to execute the command:

OpenDRO> scale.show(1)
Scale        : 0
Config Type  : auto
Active Type  : 21bit
Auto Weight  : 0
Invert       : no
Count        : 1162
CPI          : 2560
Filter       : yes
AMA Count    : 1162.285476