Improve term readline support