rlfe in Matlab

rlfe (local copy) provides you with nice line editing capabilities provided by GNU readline whenever they are not otherwise available.

This horrible patch makes rlfe “less clever” so that it takes control over line editing when running Matlab in a terminal, even though Matlab provides some line editing control of its own. I find this desirable as the line editor Matlab uses just isn’t as good as readline.

Problems: up arrow doesn’t behave the same any more (can be partially fixed by playing with ~/.inputrc). More importantly tab completion of function names is broken. One can hack rlfe to pass tabs through to Matlab, but this alone doesn’t work very well. I haven’t got around to trying to fix it properly.

Of course Octave, being free software, is usually linked against readline without the need for this hackery.