14

I'm a long time screen user trying to make the jump to tmux. One screen feature I use is the ability to truncate Ctrla :set wrap output. This is especially useful when tailing log files or following compile sessions whose lines are hundreds of characters long.

I've read the man page and googled extensively and cannot find an equivalent command, or a viable work-around using shell commands. The closest I can come up with is piping everything to less -S and putting less into "follow" mode.

7

I don't think tmux has this feature, feature request?

One pipable workaround that I often use is "cutting" up to and including $COLUMNS:

tail -f LOG | cut -c1-$COLUMNS

Note that this is not "nowrap", it actually removes the ends of the lines. Also, terminal resizing is not acted upon.

  • Thanks for the info. I've tried variations on the theme as well. I've found "less -eS --follow-name" to be as close as I can get... IF if remember to run that command first. – Doug Jul 27 '12 at 16:14
  • 1
    You might do a little better with less +G +F -eS --follow-name, that will get you directly into tail mode. But you're right, it would be better if the terminal handled the wrapping. – Thor Jul 27 '12 at 16:23
  • +G is actually redundant. – Thor Jul 27 '12 at 16:53
  • This unfortunately doesn't work with xtail... – MemphiZ Dec 24 '16 at 0:37
3

I have tmux 2.6, and I can run the command setterm -linewrap off to have long lines truncated instead of wrapped.

See these answers:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.