tigrawap/slit

Add option to exit if input fits in one screen

Closed this issue · 1 comments

If the input fits in one screen, and this option is specified, then slit should only print input to output, and exit.

Added support, which is now a default. I guess this is behaviour that most are accustomed with less.
--always-term will enable term anyway
also, some improvement over behaviour of less, --short-stdin-timeout=10000 (10000ms is default) - how long slit will wait for stdin to overflow the screen or finish. less have hard coded value for similar behaviour

Increasing this is helpful on piping commands that take long time to produce output, but end up with short output which can fit the screen

At the moment filters applied after validating length of input. I do want to change this, but this is more work to be done. Calculation of length already done via slit framework, so it's a half way

cc @olshevskiy87