1

Some shells seem to have a feature where a long command is compressed and partially hidden. For instance the following command:

$ echo this is a really long command line that goes on and on and on and on

Might be displayed as:

$ y long command line that goes on and on and on and on <

Depending on how long the prompt is and how wide the terminal is. Anyway, my question is what is this feature called and how do I turn it off?

  • Try quotes " around your statement after the echo and at the end of the line. e.g. echo "this is a really long command line that goes on and on and on and on" – Terrance Feb 26 '16 at 17:55
0

Different shells implement this differently and the options are named differently

bash has ability to unset horizontal scroll mode in side .inputrc like so

set horizontal-scroll-mode On

dash does it by default , but I've found no indication of an option to turn it on/off in the man page

ksh has set -o multiline option for that, while its derivative mksh does not seem to have any option.

The ability to unset it is always available through use of \ character. To un-wrap long lines type in \ and immediately press Enter. Don't add additional space or other chars - hit \, hit Enter.

| improve this answer | |

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.