GNU/Linux ◆ xterm-256color ◆ bash 19 views

smartless is a pager that behaves just like less, but will show the file (or input) directly in the terminal if it is short enough to fit in the terminal height. For longer files (or if multiple files are passed), the pager is still invoked, and only the first and last few lines will be kept in the terminal (so everything is still visible without scrolling), with a truncation message in the middle. The full contents can optionally be recorded and later recalled via a short ID.

https://github.com/inkarkat/smartless