I'm on fresh Lubuntu 14.04 installation. I am using LXTerminal and this is the prompt I'm setting through .bashrc file:
export PS1="\e[0;36m$ \w \e[m"
Assume I enter a command up to 15 characters long (and execute so it registers to history) (never mind "command not found"):
$ ~ 012345678901234 012345678901234: command not found
Now if I press up arrow I get my command back:
$ ~ 012345678901234
And if I press down arrow, I'm back to the bare prompt:
THE PROBLEM The problem starts if I have 16 or more characters to run:
$ ~ 0123456789012345 0123456789012345: command not found
Now when I press up arrow, I am presented with previous command just fine:
$ ~ 0123456789012345
Pressing down arrow doesn't bring me back to bare prompt, it somehow memorizes 10 characters of the first over 16-characters long command in my history and displays it until anything else is run. It basically becomes my default prompt for the time being.
$ ~ 0123456789
I can now press return to get rid of it, or I can run any other command. For the sake of example this:
$ ~ 0123456789ls Desktop Documents Downloads Music Pictures Public Templates Videos
What can I do to fix it? It's not that big a deal but it's quite annoying.