Correct Terminal prompt wrapping

Sometimes I get a wrong wrapping when using terminal via ssh and I find out is mostly to do with the size of the window assumed by the terminal is not the same as your actual window size.
E.g.:
Wrong Wrapping

To solve this:

$ shopt checkwinsize
And check if the checkwinsize is eanbled, if not:

$ shopt -s checkwinsize
Then just run another command or resize your window size.

You could put this command on your ~/.bashrc or /etc/bashrc

Leave a Reply

Your email address will not be published. Required fields are marked *