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 ?
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 ?
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)
