I love piping any output into less -S
because it prints neatly without wrapping long lines of output into new lines (especially for tables). However, I wonder if there is a way to truncate long lines for anything that is printed directly in the terminal, with the option to seeing the chopped portion by using the right arrow key.
-
2That would probably need to be a "terminal" (e.g. similar to rxvt) having the same "-S" mode.– HannuCommented Mar 1, 2023 at 17:51
Add a comment
|
1 Answer
For many terminals,
setterm -linewrap off
should do the trick for the truncation.
There seems to be a java implementation of a terminal with a horizontal scrollbar. It is called Terminator Haven't tried it myself.
-
1And many terminals then discard the excessive text, I think. Can you name terminals "with the option to see the chopped portion"? Commented Mar 3, 2023 at 16:36
-