ile(1)

NAME
ile (lile) - frontend Input Line Editor

DESCRIPTION
The ile program is an input line editor that adds emacs-style command line editing functions plus an easy to use (tcsh-style) history mechanism to interactive programs that have no such abilities themselves.

The ile program can be run as a simple shell around any program. It gives any program an input line editing and a history mechanism. It can also be run around your favourite shell. When run around the shell ile records the input to interactive programs launched from the shell as well as the commands to the shell in its history buffer.

lile is the LynX-release of ile. This manual actually describes lile but I will just reference it as ile. lile has been specially prepared to work as interface to line-mode telnet sessions as well as interactive ftp sessions and all sorts of other interactive but non-line-editing software. The classic use of this program is to connect to an Internet service running on a TCP port of a remote machine, somehow like this:
    ile telnet <host> <port>
But since lile is very flexible and doesn't make many assumptions about what it's running with, it turns out to be a comfortable extension to many programs. If there's any situation where you would like to edit what you typed with your cursor keys, try doing it with ile the next time. :-)

One particular praise of ile is the way it completely disables all its editing as soon as the subprogram attempts to do so itself, or for any reason switches into raw mode. This makes ile usable with just about any program. And it will handle "Password:" prompts safely (does not make the password visible, does not store it in history).

SYNTAX
    ile [<program> [<arguments>] ]

ile launches the program as its subprocess and puts itself between it and you and interprets your keyboard presses before forwarding them.

If no program is given on the command line ile executes a shell as specified in your environment variable SHELL.

NEW FEATURES

ile 2 now handles signals properly. That means, it forwards all catchable signals to the subprocess. Conversely, all status changes in the child are duplicated by ile. For instance when the subprocess is suspended, ile will also suspend. This should make ile behave transparently when called from an interactive shell with job control. It also attempts to catch the prompt string that the host program gives you, so you will be re-prompted by ile when you use the clear_screen (^L) or the redraw_line (^R) functions.

DEFAULT BINDINGS

Not everyone wants to have to figure out yet another initialization file format so ile provides a complete set of default bindings for all its operations.

Delimiters

Delimiters are used in ile to mark the beginnings and ends of words for the forward_word, backward_word, and delete_word actions. The default delimiters are ' ' (blank), '/' (slash), '.' (period), and '-' (dash). These were chosen because the author decided they were "natural" stopping characters in a *IX environment.

Keys

The following table shows the default bindings of keys and key sequences provided by ile. These are based on the emacs key bindings for similar operations.
    ^A      - start_of_line
    ^B      - backward_char
    ^C      - pass (interrupt)
    ^D      - delete_char_under
    ^E      - end_of_line
    ^F      - forward_char
    ^G      - insert (BELL)
    ^H      - delete_char (BS)
    ^I      - insert (TAB)
    ^J      - send_line (LF)
    ^K      - erase_to_end_of_line (kill)
    ^L      - clear_screen (and redraw)
    ^M      - send_line (CR)
    ^N      - forward_history (next)
    ^O      - search_backward_history (old)
    ^P      - backward_history (previous)
    ^Q      - pass (resume output)
    ^R      - redraw_line
    ^S      - pass (suspend output)
    ^T      - transpose_chars
    ^U      - erase_line
    ^V      - quote
    ^Z      - pass (suspend process)
    ^?      - delete_char (DEL)
    ^]      - pass (telnet escape)
    ESC b		- backward_word
    ESC f		- forward_word
    ESC BS		- delete_word
    ESC DEL		- delete_word
    ESC u		- upper_word
    ESC l		- lower_word
    ESC c		- capitalize_word
    ESC [ A    - backward_history   (up arrow)
    ESC [ B    - forward_history    (down arrow)
    ESC [ C    - forward_char       (right arrow)
    ESC [ D    - backward_char      (left arrow)

INITIALIZATION FILE
If your ile has been installed without support for initialization files you can skip the rest of this manual. There is no way for you to have that executable of ile use an other key setup. If it has such abilities instead, then it will first look for a file called $HOME/.ilerc-<application> to contain its initialization information where <application> is the name of the program you run with ile, then it looks for a ./.ilerc in the current directory and then for $HOME/.ilerc again in your home directory. When no initialization file is found ile will use its default values for delimiter and key bindings.

The ile initialization file has two parts. The first part is also the first line of the file. This line contains the delimiter characters that will be used by the forward_word, backward_word, and delete_word actions. Each character on the line becomes a delimiter character. The second part of the file is a list of table numbers, characters, and actions or strings. ile has 4 action tables. Each action table contains an action or string for each possible character. ile decides what to do with a character by looking it up in the table and executing the action associated with the character or by passing the string one character at a time into ile as if it had been typed by the user. Normally only table 0 is used. But, the meta actions cause the next character to be looked up in a different table. The meta actions make it possible to map multiple character sequences to actions. By default, all entries in table 0 are bound to the insert action, and all entries in the other tables are bound to the bell action. User specified bindings override these defaults. The following example is an initialization file that sets up the same key and delimiter bindings as the ile default bindings.

Example .ilerc file
     /.-
    0^L=redraw_line
    0^R=search_backward_history
    0\177=delete_char
    0^C=pass
    0^Z=pass
    1\177=delete_word
    1[=meta2
    2A=backward_history
    2B=forward_history
    2C=forward_char
    2D=backward_char
The first character on each key binding line is the index of the table to place the key binding in. Valid values for the index are 0, 1, 2, and 3.

The second character on the line is either the character to bind or an indicator that tells how to find out what character to bind. If the second character is any character besides '^' or '\' then the action is bound to that character.

If the second character on the line is '^' then the next character is taken as the name of a control character. So ^H is backspace and ^[ is escape.

If the second character on the line is a '\' and the next character is a digit between 0 and 7 the the following characters are interpreted as an octal number that indicates which character to bind the action to. If the character immediately after the '\' is not an octal digit then the action is bound to that character. For example, to get the '^' character you would use '\^'.

The next character on the line is always '='. Following the equal sign is the name of an action or a string. The actions are defined in the following table.

Actions

bell
    Send a bell (^G) character to the terminal. Hopefully the bell will ring. This action is a nice way to tell the user that an invalid sequence of keys has been typed.

pass
    Pass the character to the program running under ile. Do not echo the character, do not insert it into the edit buffer. Just pass it along. This is useful for characters like ^C, ^Z, ^Q, and ^S that have special meaning and shouldn't be held up in the edit buffer waiting to be sent.

clear_screen
    Send the clear screen code to your terminal, then write the last recognized prompt to the screen and redraw the input line.

insert
    Insert the character into the edit buffer. If there are already 256 characters in the buffer ile will beep and refuse to put the character in the buffer.

transpose_chars
    Swap the character under the cursor with the character to the left of the cursor and move the cursor one character to the right. This is handy for correcting letter transposition errors.

delete_char
    Delete the character directly to the left of the cursor from the edit buffer.

delete_char_under

    Delete the character under the cursor from the edit buffer.

quote

    The next character to come into ile will be inserted into the edit buffer. This allows you to put characters into the edit buffer that are bound to an action other than insert.

meta1

    Look up the next character in action table 1 instead of action table 0.

meta2

    Look up the next character in action table 2 instead of action table 0.

meta3

    Look up the next character in action table 3 instead of action table 0.

delete_word

    Delete the word directly to the left of the cursor. A word is a sequence of characters surrounded by delimiter characters.

forward_word

    Move the cursor to the right past the next word. A word is a sequence of characters surrounded by delimiter characters.

backward_word

    Move the cursor to the left past the next word. A word is a sequence of characters surrounded by delimiter characters.

upper_word
    Starting with the character under the cursor, convert the word to the right of the cursor to upper case.

lower_word
    Starting with the character under the cursor, convert the word to the right of the cursor to lower case.

capitalize_word
    Convert the character under the cursor to upper case. Convert the word to the right of the cursor to lower case.

start_of_line

    Move the cursor to the left most character in the edit buffer.

backward_char

    Move the cursor to the left one character.

end_of_line

    Move the cursor past the last character in the edit buffer.

forward_char

    Move the cursor to the right one character.

add_to_history

    Add the contents of the edit buffer to the history buffer and pass the line along to the program running under ile.

erase_line

    Clear the line. Erase all characters on the line.

erase_to_end_of_line

    Delete the character under the cursor and all character to the left of the cursor from the edit buffer.

redraw_line

    Redraw the contents of the current edit buffer. This is handy when system messages or other asynchronous output has garbled the input line.

forward_history

    Display the next entry in the history buffer. If you are already at the most recent entry display a blank line. If you try to go forward past the blank line this command will beep at you.

backward_history

    Display the previous entry in the history buffer. If there are no older entries in the buffer, beep.

search_backward_history
    Search for a line in the history buffer that starts with the characters to the left of the cursor. If a match is found the matched line is displayed. If no match is found this command will beep at you.

Strings
In addition to being able to bind a character sequence to an action ile allows characters sequences to be bound to strings of characters. When a string is invoked the characters in the string are treated as if they were typed by the user. For example, if the line:
    0^G=ring^Ma^Mbell^M
was in your .ilerc file, typing control G would cause three lines to be typed as if the user typed them. Using the default bindings, unless there is a ^J or ^M in the string the string will be inserted in the current line but not sent along until the the user actually presses return.

Error Messages

When ile encounters errors it prints a message and terminates. ile can print several standard error message. It can also print a few messages that are specific to ile.

ile: unable to allocate pty/tty pair
    There are no free pty devices in the system. You can either try again later, and hope someone has freed a pty for you to use, or you can grab your system manager and try to get more pty devices configured.

ile: '=' missing on line #
    In a character binding line you left out the '=' character. Or, you did something that confused the initialization file reader into thinking there should be an '=' where you didn't think there should be one.

ile: error in initialization file on line #
    This means that the first character of a character binding line wasn't a newline or a '0', '1', '2', or '3'. It could also mean that the initialization file reader is confused.

ile: can't find terminal
    ile could not find a termcap entry for the terminal named by the TERM environment variable. Since it can't find it ile can't figure out how to use it.

ile: can't run on terminal
    The terminal named in your TERM environment variable doesn't support the capabilities ile needs to run. So ile doesn't even try.

BUGS

ile has a lot of problems with editing lines that wrap.

ile changes the input mode on the controlling terminal to RAW. This confuses some terminals. This line might be of help then:
    stty cooked -nl echo tabs crt decctlq -litout

ile requires a terminal that supports the termcap le, ce, bl, nl, and cr capabilities. If your terminal doesn't provide these, ile might produce garbage output.

A misspelled action name in an ilerc will be treated as a string. This means that typing the sequence of characters that should invoke the action will actually cause the misspelled name to be inserted in the input line.

FILES

 $HOME/.ilerc
 ./.ilerc

SEE ALSO

stty(1), termcap(5)

COPYRIGHT
COPYRIGHT 1988 Evans & Sutherland Computer Corporation Salt Lake City, Utah All Rights Reserved.

THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY EVANS & SUTHERLAND. EVANS & SUTHERLAND MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. IT IS SUPPLIED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.

IF THE SOFTWARE IS MODIFIED IN A MANNER CREATING DERIVATIVE COPYRIGHT RIGHTS, APPROPRIATE LEGENDS MAY BE PLACED ON THE DERIVATIVE WORK IN ADDITION TO THAT SET FORTH ABOVE.

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both the copyright notice and this permission notice appear in supporting documentation, and that the name of Evans & Sutherland not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission.

AUTHORS
 Original ile written by
   Robert C. Pendleton <bobp@hal.com>
 Derived, lynxified version by
   Carl v. Loesch <loesch@informatik.uni-oldenburg.de>
 Precious contribution of signal handling code by
   Andreas Stolcke <stolcke@ICSI.Berkeley.EDU>