0

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.

1
  • 2
    That would probably need to be a "terminal" (e.g. similar to rxvt) having the same "-S" mode.
    – Hannu
    Commented Mar 1, 2023 at 17:51

1 Answer 1

2

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.

2
  • 1
    And 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
  • Sorry, missed that requirement. Added terminator. Commented Mar 4, 2023 at 17:13

You must log in to answer this question.

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