Fix command history on partial command input.