Implement persistent history for the console.