9

Is there a way to prevent konsole from wrapping lines? It would be great if I could do it without disabling any of the other features like extended colors and other of the fancier things.

1 Answer 1

10

There's a VT100 control sequence for that, which should be supported by Konsole. It's called DECAWM, and here's how to emit it:

echo -ne '\e[?7l'

My question would be though: why?

5
  • Well I'm tailing a file and I just need to quickly glance at the first few dozen characters of the line before I look at the rest. I want to be able to see the rest if I choose to, but I want to see the first bit first. This just seems easier than piping my tail through a complex regex
    – Falmarri
    Commented Dec 16, 2010 at 6:18
  • 2
    'less' might be the tool for you then. Invoke it with the -S (or --chop-long-lines) option to stop it from wrapping lines. You can scroll left and right with the cursor keys. Hit F (uppercase, i.e. with Shift down) to make 'less' tail the end of the file.
    – ak2
    Commented Dec 16, 2010 at 9:41
  • +1 for your suggestion of less!
    – Josh
    Commented Dec 16, 2010 at 14:19
  • 3
    ...if you try the escape sequence: then to re-enable the wrap echo -ne '\e[?7h'
    – Peter.O
    Commented Apr 26, 2011 at 22:26
  • Thank you very much! very helpful for me using dropdown terminal in half screen, and I can work it out with just the 80% first portion of console screen most times.. wrapping was making hard to read errors and rspec output.. Commented Apr 15, 2019 at 14:20

You must log in to answer this question.

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