Reworked 'readline' support implementation.