4 ms·
Some way of automatically applying 'less' to shell commands when the output exceeds a limit (like 40 lines) but is otherwise invisible. (There may be issues wi
by j_not_j 4y ago
Some way of automatically applying 'less' to shell commands when the output exceeds a limit (like 40 lines) but is otherwise invisible.
(There may be issues with automatically not doing this when piped.)
- tommiegannert 4y agoless -F will cause less to terminate if there's only one screenful of text. I usually forget to add it, so just knowing about -F isn't enough for me. As for always applying it... I don't think bash has hooks to transform interactive command lines. Do other shells? Another thing: exporting less(1) search history as grep commands, though a recent post made me realize I should use fzf and related tools instead.