sql.php seems to be optimized for running pre-prepared scripts, which is all well and good but it would be nice to get the GNU readline goodies when stdin is actually a terminal.
The readline stuff is encapsulated in Maintenance::readConsole() which'll return a line at a time.
Looks like sql.php sends stdin straight into Database::sourceStream() which does fgets() directly... that'll probably need to be extended to add a callback to override the actual reading, or else clever use of stream wrappers. :)
Version: 1.18.x
Severity: enhancement