Readline support in file:read

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Readline support in file:read

Dirk Laurie
`make linux` or `make macosx` builds Lua with readline support.  

However, `io.read()` does not have readline support.  I can see why: the file
associated with `io.stdin` might not be one for which editing makes sense.

I dream of this:

file:read('*e'): reads the next line skipping the end of line,
  returning nil on end of file, applying editing.

Problem is, I'm not a patch virtuoso.

Dirk