3

I changed the PS1 for terminal to

export PS1="\033[0;33m\h:\W \u\$ \e[m"

Now, it doesn't type into new lines in case of a long sentence. Instead, it just overwrites on the existing written stuff in the same line.

Am I missing something ?

Maythux
  • 87,123
vikiboy
  • 55

1 Answers1

1

The correct syntax must be:

PS1="\[\033[0;33m\]\h:\W\u\$\[\033[m\]"

Or if you prefer to use \e instead of \033:

PS1="\[\e[0;33m\]\h:\W\u\$\[\e[m\]"

Your problem in missing \[ with the \e ASCII escape character (033)

enter image description here

Maythux
  • 87,123