ile - An input line editor for UNIX (Input Line Editor)
ile [-file/name] [prog arg1 arg2 ... argn]
The ile program is an input line editor that provides an easier to use history mechanism than the shell.
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 favorite shell. When run around the shell ile records the input to programs as well as input to the shell in its history buffer.
ile takes two optional command line arguments. The first argument is the name of an initialization file containing user defined key and delimiter bindings. The second argument is the name of a program to execute and the command line arguments for that program.
If no initialization file is given on the command line ile first looks in ./.ilerc and then in $HOME/.ilerc. If no initialization file is found ile provides default values for delimiter and key bindings.
If no program name is given on the command line ile executes csh.
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 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 UNIX environment.
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 ^E - end_of_line ^F - forward_char ^K - erase_to_end_of_line ^L - retype_line ^N - forward_history ^P - backward_history ^R - search_backward_history ^V - quote ^T - transpose_chars del - delete_char ^M - add_to_history ^J - add_to_history ^U - erase_line ^X - delete_char_under ^C - pass ^D - pass ^Q - pass ^S - pass ^Z - pass esc b - backward_word esc f - forward_word esc del - delete_word esc esc - complete_file esc s - complete_file_full esc p - query_path esc d - show_files 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)
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 escape actions cause the next character to be looked up in a different table. The escape 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.
/.- 0^A=start_of_line 0^B=backward_char 0^E=end_of_line 0^F=forward_char 0^K=erase_to_end_of_line 0^L=retype_line 0^N=forward_history 0^P=backward_history 0^R=search_backward_history 0^V=quote 0^T=transpose_chars 0\177=delete_char 0^[=escape_1 0^M=add_to_history 0^J=add_to_history 0^U=erase_line 0^X=delete_char_under 0^C=pass 0^D=pass 0^Q=pass 0^S=pass 0^Z=pass 1b=backward_word 1f=forward_word 1\177=delete_word 1[=escape_2 1^[=complete_file 1s=complete_file_full 1p=query_path 1d=show_files 1u=upper_word 1l=lower_word 1c=capitalize_word 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.
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 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.
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.
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 the character directly to the left of the cursor from the edit
buffer.
Starting with the character under the cursor, convert the word to the right of the cursor to upper case.
Starting with the character under the cursor, convert the word to the right of the cursor to lower case.
Convert the character under the cursor to upper case. Convert the word to the right of the cursor to lower case.
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.
Take the word currently under, or immediately to the left of the cursor and treat it as a partial file name and path name. If there is only one file in the directory that starts with the partial file name then fill in the rest of the file name in the input line. If more than one file starts with the partial file name fill in the longest common starting string of those file names. If the path is specified as "~/" then look in the directory named by $HOME.
If the path is specified as "~name", where name is a user login name or a partial user login name, then look in the users login directory. If more than one match is found for a partial user name then ile will beep. When completing a file name, a partial user name will be completed at the same time the file name is being completed.
If you use abbreviated path names like "./file", "../file", "dir/file", or "file" ile uses the path name saved by the most recent query_path command or the value of $PWD at the time ile was started.
Like complete_file but abbreviations like "~/" are replaced by the full path that they stand for. This is handy when you want to use abbreviated path names but the program you are talking to doesn't understand the abbreviations.
Read the discussion of file name completion under complete_file for more information.
ile isn't the shell and doesn't know what the current working directory is. But, ile tries to do file name completion as if it did. To do this task ile keeps around the path to the current working directory. When ile is started up this path is initialized from $PWD. The query_path command is provided to allow users to update this path at any time.
When query_path is invoked ile makes the blatant assumption that the program running under ile is a shell and sends the shell command "pwd" to that program. Whatever comes back from the program is assumed to the path to the current working directory. The next response from the program is assumed to be a new prompt from the shell and is ignored.
Read the discussion of file name completion under complete_file for more information.
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.
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.
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.
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.
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 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.
The terminal named in your TERM environment variable doesn't support the capabilities ile needs to run. So ile doesn't even try.
ile changes the input mode on the controlling terminal to RAW. This confuses xterm. It is a good idea to include the line:
stty cooked -nl echo tabs crt decctlq -litout
in your .cshrc file when using xterm. Otherwise your new xterm windows come up in an unusable state.
ile requires a terminal that supports the termcap le, ce, bl, nl, and cr capabilities. If your terminal doesn't provide these, ile will refuse to run on your terminal.
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.
$HOME/.ilerc
./.ilerc
stty(1), xterm(1), csh(1), termcap(5)
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.