This question already has an answer here:

After I made some changes, on Debian 9, to my prompt, it start behave.. strange. Like you see bellow, it start wrapping after command overflow certain length.

enter image description here I wanna keep it simple, so only thing I test against, while setting the prompt, in my .bashrc is the user and some special variables from text editors:

if [ "$USER" != root ]; then    # Set prompt for regular users
    PS1="${Gre}▒${Bla}${On_Cya}[\w]${RCol}$ "
else                            # Set prompt for root
    PS1="${Red}▒${Bla}${On_Cya}[\w]${RCol}$ "

case $INSIDE_EMACS in           # Set prompt for emacs client
    *comint*) PS1="[\W]$ "

${Gre}, ${Bla}, ${Red}, ${On_Cya} and $RCol, are defined simply like this:

RCol='\e[0m'    # Color Reset

marked as duplicate by Stephen Kitt, Kusalananda bash Mar 22 '18 at 10:19

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.

Browse other questions tagged or ask your own question.