Using less -R to Preserve ANSI Color in Command Output
Shows how to use less -R to view ANSI-colored output, set defaults via LESS, and avoid pitfalls like garbled escape sequences or line truncation.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Shows how to use less -R to view ANSI-colored output, set defaults via LESS, and avoid pitfalls like garbled escape sequences or line truncation.
Desired behavior The GNU less pager can display a file that is being modified after the pager has started, but the view does not update automatically. The user must press a navigation key (e.g., f or space) to trigger a manual refresh. This limitation can lead to stale views when the file changes frequently. Current constraints Standard releases of less (≥3.