To prevent Text Wrap in OSX Terminal? [duplicate]
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?
Solution 1:
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.
Solution 2:
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).
Solution 3:
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