This question already has an answer here:

Before I used Zsh and some themes are not work properly, I thought that because of Zsh, but when I returned to Bash shell it still got same problem. Here is the problem: It doesn't jump right into the next line instead it replace my own PS1 promt. How can I fix it?

#.bashrc configuration
PS1='\e[0;32mCow\e[m-\e[0;30m\W\e[m' # Colors
PS1='Cow-\W ' # No colors

I wrote same path and here is the different within color and without color................... Left with color added ..............................................Right without color added

enter image description here

marked as duplicate by Thomas Dickey, Jeff Schaller, Thomas, roaima, RalfFriedl Jan 13 at 11:12

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • What do you mean by the paragraph starting "I wrote same path..."? I also don't understand what you're trying to show us with the screenshot. – roaima Jan 12 at 21:00
  • Sorry, because made it unclearly. On the screenshot there are (2 windows of terminal. (On the left side with color added from the code above) When I write /etc/pacman.d/gnupg/openpgp-revocs.d/ /etc/pacman. (It's supposed to be the same with right side (without color added). It doesn't jump to the next line instead it replace the current line. (it's mean bash prompt) Briefly Left side it replaced text with bash prompt, right side it doesn't replace bash prompt instead it jump to the next line if there are no space. – HieuC Jan 12 at 21:23
  • There's several possible duplicates... – Thomas Dickey Jan 12 at 21:24
  • Thank @Thomas Dickey for refer that link. I tested those code and it work properly. I have clue to fix on my own now, Thank so much – HieuC Jan 12 at 21:30

Browse other questions tagged or ask your own question.