Linux – Long commands typed in bash overwrite the same line

bashcommand linelinuxshellterminal

Since We updated Bash to 4.3.27 whenever I type a long command, if it reach the end of terminal window, instead of continuing in a new line, it overwrites over the same line using a ">" at the beginning to mark that the line was wrapped (I can go back and forward over the line. I mean, it doesn't just overwrites the current line)

Something like:

Lets say my terminal its 30 chars width

Before update

user@HOSTNAME ~$ echo "hello w
orld!"

After update

<ME ~$ echo "hello world!"

Nothing was changed in my environment since that bash update. $BASHOPTS shows the same values as it has before except "complete_fullquote"

How can I restore the "multiline behaviour"?

Regards

Best Answer

Change your TERM variable. For instance, if I do

~$ export TERM=xterm

Then the behaviour is nicely wrap, like before your update

With

~$ export TERM=linux

The behaviour is the one after your update

This post on askubuntu may help you if you have a colored PS1.

Related Question