Improve input and command history navigation.