Added support for external history mgmt to the REPL.