I am having a weird issue with my terminal wrapping, and after reading online I have found out it is likely because of my PS1 setup, however, I looked at it, and it seems to match what people are saying, so I am not sure whether or not I am doing something else wrong.PS1='\[\e[1;36m\]\u\[\e[m\]\[\e[0;31m\]\a@\[\e[m\]\[\e[1;36m\]\aubuntu\[\e[m\]\[\e[1;31m\]\a:~>\[\e[m\]'Anyone to possibly identify what might be wrong? One way I tried to combat this was to set stty columns to 1000 but that made a lot of other things worst (such as ls and vim).
Terminal Line not properly wrapping
ubuntu;terminal
Editing to Clarify: I have seen issues like this in the past due to incorrect escaping of non printed colors. In my case it was due to not having \[ in front of each escape sequence in your case it may be more to do with not recognizing '\e' so i would recommend replacing \e with \033 making sure that you always have [\033 in front of each [x;yzm] for your colors. I presume \e[m\] is meant to disable colors, I would use\[\033[0m\] for this instead (mostly because i know it works in all cases) You may consider setting this as a variable in the same way i have below with PMT_Color_Off to tidy up your prompt and make it easier to debug. I have shown examples of what i do below.I am escaping my colors like so PMT_Red=\[\033[0;31m\] where as for non prompt it is just Red=\033[0;31mTo turn the color off I use PMT_Color_Off=\[\033[0m\] and Color_Off=\033[0m for non prompta working copy of the prompt on one of my development machines isexport PS1=\[\033[01;33m\]$(ifconfig | grep inet | grep -v 127.0.0.1 | awk '{print $2}' | awk -F: '{print $2}') \[\033[01;32m\]\u@\h \[\033[01;34m\]\[\033[01;33m\]\w #\[\033[00m\] http://www.askapache.com/linux/bash-power-prompt.html also uses the \033 escape rather then \eI have tested mine on several terminal emulators including xterm, gnome-terminal, terminology and the frame buffer