add regexp-based highlighting
avoid recursion when adding history entries
fix uninitialized history entry