12

I would like to prevent the text wrap in OSX Terminal, by letting text to continue under the border. I could not find it in Preferences of the terminal.

How can you prevent text wrap in OSX Terminal?

  • How would you like Terminal to behave upon your cursor reaching the last column position of the window? – dan Jun 8 '15 at 22:47
  • @danielAzuelos I do not want terminal to wrap text when reaching the last column position of the window. – Léo Léopold Hertz 준영 Jun 9 '15 at 6:17
  • 2
    Would you like it to continue under the border, would you like it to be dropped and this event be signaled by a bing as on old typewriter, would you like the character size to be reduced so as to be able to handle 160 characters per line, would you like the window to scroll on the right so as to display from columns positions 81 to 160, would you like an adjacent window to popup to host the excess characters…↵ What do you want? – dan Jun 9 '15 at 6:43
  • 1
  • 1
    Does this answer your question? Disable line wrapping for output in the Terminal – pkamb Apr 4 at 8:30
5

This function doesn't exists in Terminal. It doesn't exist within xterm either. It might be really usefull to read log files with very long lines or output of commands as tcpdump. The wrapping render them unreadable.

I suggest you to fill a feedback about this function on: MacOS X feedback

To make it a winning improvment proposal I suggest you to ask for an horizontal scrollbar so as to be able to display the text which is beyond the right border.

| improve this answer | |
  • 3
    I submitted a feature request to Apple, including the ticket below for the record. – Léo Léopold Hertz 준영 Jun 9 '15 at 7:49
  • 1
    Excellent idea! – dan Jun 9 '15 at 11:03
5

Not really a Terminal.app bug, but rather part of the terminfo entries which describe various terminals and their features (like xterm-256color, the Terminal.app default).

From man terminfo:

Variable String Capname  TCap Code Description
enter_am_mode   smam     SA        turns on automatic margins
exit_am_mode    rmam     RA        turns off automatic margins

Try tput rmam then the commands you want. This should turn off auto wrapping.

tput smam sets automatic margins back to the default for terminal entries with the "am" or "automatic-right-margin" capability.

less doesn't seem to deal well with long lines after tput rmam, use the option -S or --chop-long-lines instead.

For horizontal scrolling of the prompt line, see man bash under horizontal-scrolling-mode (off by default).

| improve this answer | |
  • If tput smam or tput rmam are not working for you, then check your ~/.inputrc file to see if there's an override like set horizontal-scroll-mode On – Yzmir Ramirez Apr 6 '19 at 8:22
4

This report is included here because Apple does not make these feature requests public by any means, organizing better the application of this proposal.

I submitted the following feature request to Apple

enter image description here

  • 3
    "because Apple does not make these feature requests public" you can't imagine how deep this goes. The author of a feedback can't even have a track of his request. I keep copies of mine to avoid repeating the same one every 2 months :). – dan Jun 9 '15 at 11:00
  • @dan, I don't get it. why bother talking to Apple? – Pacerier Apr 25 at 15:16

Not the answer you're looking for? Browse other questions tagged .