I have an issue with my terminal prompt line. When the line is too long it wraps on the same line and then Up arrow makes it look even worse.
I have already checked Terminal prompt not wrapping correctly, but it looks like I am apparently closing all the squared brackets for non printable characters.
This is my PS1:
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot) }\[\033[01;36m\]\u@\h\[\033[00m\]\033[01;34m\]\w\033[00m\][$(type __git_ps1 >/dev/null 2>&1 && __git_ps1 "(%s)")]
Consider this as my standard prompt line
MELISC@work~/dev/bin_tools[((main))]
I was able to get
assdasdasdasdasdadasdsadadasdaddasdadadasdadsadasdsa((main))] asdsadsadsadsadasdasdassdasdasdassdasdassdasdasdasdasdasdasdsadsad
I have already checked my .bashrc
I have and shopt -s checkwinsize
should autocheck the columns
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot) }\[\e[01;36m\]\u@\h\[\e[00m\]\[\e[01;34m\]\w\[\e[00m\][$(type __git_ps1 >/dev/null 2>&1 && __git_ps1 "(%s)")]
and now it is perfectly working! I had never really understood how that thing worked until I read you explanation. – melisc Oct 21 '16 at 08:52banjanxed
– Apr 18 '18 at 15:25