README FOR LINUX VERSION OF ile -- INPUT LINE EDITOR

This is a port/enhancement of Rob Pendelton's ILE pty front end to
the Linux OS.  I myself mostly use it for 'rc' -- the unix port of the
USL plan 9 shell -- because it has no builtin line editing, and for
ash the excellent enhanced /bin/sh clone which also has no line editing.
I used to use it for 'ftp', but then I got ncftp.  I've found it to work
more reliably than 'atty' another popular front end, though its source code
is probably less modular.  It is nearly seven years old (much older than Linux
itself in fact ;-) but it works with Linux' pty's.  I have a lot of ideas
for enhancements, but I don't know if I'll get around to them.  I call this
the Linux version because it uses /proc/*/cwd for filename completions which
is *much* cleaner than any other pty-front end has at present.  (They mostly
use generous assumptions that the underlying process is a shell and prints out
prompts and can send codes in the prompts saying what the directory is, etc.)

                                                Charles Blake, 07/28/1994

------------------------------------------------
 DONE   The little things I've already done
------------------------------------------------

Thorough reformatting of code.  Didn't change the binary one bit though,
(I checked).  ANSI-fication of function definitions, declarations.  You must
remember that this was written well before the ANSI C draft was finalized.

delete query_path stuff and replace initialization of currentdir with
(pseudocode) currentdir=/proc/childpid/cwd
opening this directory in the proc filesystem opens the childs cwd.
Works like a charm.  Always completes correctly.
Cool huh?  [ Similarly /proc/childpid/environ has all the environment,
so you can set up an airtight communication system that is very user
friendly.  I.e., FIGNORE and other file completion options may be
specified in env-vars.  This hasn't been done yet though. ]

Add a search_forward_history.  I think it's completely insane that this
isn't in the original.  Now one can step through the history (backward
*and* forward) over those lines starting with a specified beginning.

<give up?> get ile to useable as a login shell.  Weird problems in opening
           Linux pty's when the child program should have a '-' as **argv.
     ----> Solution: have the login initialization file for the desired
           shell 'exec ile <shell> <login_flag>'.  You will probably need
           a environment variable flag to be set before exec-ing to prevent
           an infinite exec loop.

complete_file_full substitute full paths *only* for ~/ expansion (as this is
the case that really requires it.)

-----------------------------------------------------------------------------
 TO DO          Things I'd like to do if I find the time.  Any volunteers?
-----------------------------------------------------------------------------

Enhance ile option parsing so that slave's command line arguments may be passed.

*Need to add _suffix escapes_
E.g. sufesc1 -> just like escape but suck up & ignore the next character.
     sufesc2 ->           "                    ignore the next 2 characters.
To make this completely general we would have to be able to specify ignorable chars,
but we'll assume that as in the vt100 extended character sequences the stuff preceding
the suffix uniquely specifies which action is to be performed.  This is mostly
intended as support for things like F6=^[[17~, Home=^[[1~, etc. not as a general
string matching facility.  The code is still much simpler for suffix escapes than
for general strings.
    It seems like void edit_[0-3] (ch) are the only functions which call dispatch.
    I think I have to create some suff_edit_[1-3] (ch) that call dispatch and then
    read and discard [1-3] chars from the input stream.  Then I need to put in
    hooks to call suff_edit[1-3].  That is I need suff_escape_[1-3].  I need dummy
    functions to set the 'edit' function pointer to the suff_edit_[1-3], and add
    the suff_escape's to the input file interpretation and the action table
    initialization.  Whew.

*Initialization  of history from a file specified in the childs $history (yah!)
    (use $HOME/.<child_basename>_history if $history or $HISTORY are unset)
    Function to 're-sync' from a history file at any time.  This would allow
    similar shells under different instances of ile to periodically re-sync
    via some common global history file, and for history to be maintained from
    session to session.

Add some more history functions:
    top_of_history, bottom_of_history,
    search_forward_incremental, search_backward_incremental

Add some more completion functions (modularize completion code):
    menu_complete, reverse_menu_complete, environment_complete

Add simple globbing filename expansion ala glob1 or glob2

.Line buffer should be dynamically allocated, especially once filename globbing is in there.

.Verbosity levels.

..Clean up pointer-casting, get it to pass gcc -ansi -Wall
