Practical less(1) power moves that actually save time
less remains the pager you reach for when logs sprawl, diffs wrap, and colorized output turns to soup. What’s notable here are a few flags that flip it from “just a viewer” into a rapid triage tool. Use -R to preserve ANSI colors (think git diff | less -R), -S to chop long lines instead of wrapping, and -N for line numbers when you need to reference positions. Pair -F with -X so short output exits immediately and leaves the text on screen-handy in scripts and CI. Need to drop into the middle of content? +/pattern starts at the first match; +G jumps to the end. Inside less, F follows a growing file like tail -f but with search and navigation intact, and &pattern filters lines in-place for a quick “grep within the pager.”
Under the hood, LESSOPEN (often via lesspipe) transparently preprocesses input so less can peek into compressed files and common archives without manual unpacking. The bigger picture: these options keep your pipeline Unix-y-compose simple tools without losing fidelity or speed. Worth noting: you can bake defaults into your environment with LESS (and set GIT_PAGER to align git with your preferences), reducing per-command flag spam. None of this is new or hype, but used together it meaningfully reduces friction in everyday debugging, log diving, and code review.