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
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?
-
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– FalmarriCommented 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.– ak2Commented Dec 16, 2010 at 9:41
-
-
3...if you try the escape sequence: then to re-enable the wrap
echo -ne '\e[?7h'
– Peter.OCommented 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