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"?



2 Answers 2


Change your TERM variable. For instance, if I do

~$ export TERM=xterm

Then the behaviour is nicely wrap, like before your update


~$ export TERM=linux

The behaviour is the one after your update

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

  • 3
    Didn't worked. :\ . And yes, I use to have a coloured PS1 but this also happen in simplest PS1 uncoloured combinations
    – vegatripy
    Dec 4, 2014 at 16:13
  • Setting $TERM to xterm did the trick for me (tested with a PS1 with escape characters and one without (old-school > , which gave me some 1980 vibes). Interestingly, I had the undesired overwrite behavior with xterm-256color, so it's back to plain old xterm for me!
    – DaveGauer
    Aug 9, 2018 at 18:48

Short answer:

echo "set horizontal-scroll-mode off" >> ~/.inputrc

Bit longer answer:

In an interactive bash shell, user input is handled by the READLINE library (look for it in bash man page to get more informations). Per bash documentation, the default behaviour is to wrap to a new line when the input is longer than the screen width. You can override this default by setting the horizontal-scroll-mode variable.

As you don't get the default behaviour you might want to check:

  • the file pointed by $INPUTRC to see if horizontal-scroll-mode is set. Worth noting that a readline variable is set if it reads to empty, null, on (case insensitive) or 1.
  • the configure options you used if you compiled your version of bash

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.