Thursday, April 25, 2024
 Popular · Latest · Hot · Upcoming
41
rated 0 times [  41] [ 0]  / answers: 1 / hits: 29452  / 2 Years ago, tue, october 11, 2022, 9:18:52

Is there a way to tell the terminal not to wrap long lines. I wish to see a line in the same space without wrapping to the next one. I do not care if I can not see the end of the line just as long as the line stays in one. A horizontal scroll would be good for this also but for the moment the removal of the wrapping is what I need.


More From » 11.10

 Answers
6

It depends on what application you are using.



If you are viewing a file or command output using less, passing the -S option (a.k.a. --chop-long-lines) will cause output to be chopped off rather than wrapping to a new line. You can use the horizontal arrow keys to view the rest of the line.



For generic non full screen applications, you can turn off line wrapping by sending an appropriate escape sequence to the terminal:



tput rmam


This mode can be cancelled with a similar escape:



tput smam


Details on adjusting the behaviour for a few other command line tools can be found here:



http://tomayko.com/writings/StupidShellTricks


[#42468] Wednesday, October 12, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ideobedi

Total Points: 121
Total Questions: 108
Total Answers: 107

Location: United States Minor Outlying Island
Member since Sat, May 28, 2022
2 Years ago
;