As a linux user, I frequently use terminal for wide variety of things.

Sometimes it's something small like apt-get install or echo'ing env variable (and I need small terminal) and sometimes I am grep'ing server logs (and need big terminal).

I thought it would be handy to terminal start with small size (let's say standard 60x48 or so) and then expand as needed (up to full screen) to display data. Shrinking is not really needed.

Is there already something like that? Does it already have any formal name (I don't want to get sued by AWS^^ )? Or maybe it's quite easy to configure with system options or tiny bash script?

Linux Mint.

  • I'm not aware of any terminal emulator automatically resizing based on its contents. Certain terminal emulators allow to resize by an escape sequence, e.g. to switch to 100x25 size try this: echo -ne '\e[8;25;100t'. You might alias grep and friends to emit this first if the output goes to the terminal. – egmont Aug 26 '17 at 19:32
  • xterm allows these sequences, but you have to enable "Allow Window Ops". gnome-terminal also supports these, but suffers from bugzilla.gnome.org/show_bug.cgi?id=759146. – egmont Aug 26 '17 at 19:36
  • On a side note, this is where rewrapping on resize (a feature of certain terminal emulators including gnome-terminal) becomes really handy. You can enlarge the window after you've grepped the server logs, and the output will look just as if you've ran grep at the larger window size. – egmont Aug 26 '17 at 19:40
  • I would prefer it to resize without any sequence - automatically – spam Aug 26 '17 at 20:11
  • I understand, but I'm pretty sure you won't find that anywhere. That's why I outlined some closeby possibilities. – egmont Aug 26 '17 at 20:12

Your Answer

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

Browse other questions tagged or ask your own question.