This question already has an answer here:

When I scroll through the bash history with the arrow keys and hit (for example) the following string:

git clone hgit clone

In the next line of history I get something like this:

git clone hls

Where ls is the command from history and git clone h is my unwanted artifact.

The following lines from .bashrc are suspect:

PROMPT_COMMAND='echo -ne "\033]0; ${USER}@${HOST}\007"'
PS1="${YELLOW}\u@\h:${ORANGE}\w ${GREEN}\$ "

marked as duplicate by Timothy Martin, Stephen Kitt, terdon bash Mar 8 '17 at 9:21

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.

up vote 5 down vote accepted

Your ORANGE is misformed. Instead of this:


It should be, as shown below, just like the others:


Not the answer you're looking for? Browse other questions tagged or ask your own question.