If at any point the cmd2 prompt gets changed to involve anything involving color via ANSI color escape codes, then the behavior of readline when the up and down arrows are pressed gets really messed up.
This is due to a bug in how GNU Readline calculates the prompt length when the Python3 input() or Python2 raw_input() methods are called. This article has more info:
https://bugs.python.org/issue17337
Ideally, we can make cmd2 protect against this case, even though it is fundamentally a bug in GNU Readline.
If at any point the cmd2 prompt gets changed to involve anything involving color via ANSI color escape codes, then the behavior of readline when the up and down arrows are pressed gets really messed up.
This is due to a bug in how GNU Readline calculates the prompt length when the Python3 input() or Python2 raw_input() methods are called. This article has more info:
https://bugs.python.org/issue17337
Ideally, we can make cmd2 protect against this case, even though it is fundamentally a bug in GNU Readline.