From the Linux Mint forum
When I use the up arrow in a terminal to scroll through the history, I get some strange results.
If the commands in my history have been short commands, there's no problem. When I get to one that was kind of long, then the next time I hit the up arrow, the first ten or twelve characters of the long command get stuck after the cursor.
Looks like this problem is related to my use of a personalized color prompt
I had this same problem
Old prompt string
Code: Select all
PS1="\[\e]2;\w\a\e[92m\]\W \\[\e[0m\]\e[93m\]\\$ \e[0m\]"
New prompt string Deleted
When I changed from the double quote to single the missing bracket showed up but the problem with my history seems to be the double \\$ as \$ works fine
Edit @Burunduk Thank you your code works mine didn't on longer history commands.
The correct prompt string is Burunduk