Just a usability question really. You know when you are working in a terminal window and you decide to do some query that brings back a wall of text and you think to yourself... "that would be easier on the eye if I made this terminal window a bit wider" *proceeds to resize*.

What I'm wondering is if there is any way to get the terminal to re-flow the text without repeating the queries you ran before? (Note: I'm using lxterminal.)


The terminal can't really do this. it doesn't know how to layout the page properly. What if it was some NCurses app like Midnight Commander? You can't just reflow the page, you need to know what's there.

There is a mechanism for this. The terminal, or shell, can send messages to the app and it can query for the current size and make changes as appropriate. If you're running bash, check out shopt -s checkwinsize. But the app needs to know to query and redraw the screen. Once the terminal sends the "I have a new size" message, there really isn't much it can do.


If you're referring to commands that just output a bunch of data, but not control the layout of the entire screen (let's say make, gcc, grep etc., as opposed to e.g. a text editor) then newest versions of gnome-terminal do re-flow those lines for you.

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.