Server Bash Line Wrapping Over Text & In Wrong Place
- by Pez Cuckow
This is quite a hard problem to explain, when connecting to one of my servers using the bash shell, under any user the line wrapping is broken and has all sorts of problems. Once of which I detail in screenshots below:
Other problems I experience include nano getting very confused about which line and or letter I am on, as shown by typing the same message into nano:
These problems only occur when connecting as I previously mentioned to one of my servers which runs CentOs. Do you know why this is occurring and what I can do to fix it? On other servers the message works fine!
Thanks for your time,
Output of requested commands:
Server that doesn't work properly:
Working server:
Could it perhaps be the custom prompt on the non working server? In .bashrc
PS1='\e[1;32m\u@\h\e[m:\e[1;34m\w\e[m$ '
Commenting this out appeared to resolve the problem.
Google says line wrapping errors can occur if you don't conform to these rules
use the \[ escape to begin a sequence of non-printing characters,
and the \] escape to signal the end of such a sequence
I am not sure where this would fit in on my prompt?