Added support for Comint and the like