3 ms·
For a command-line relative, note that you can write a custom .lessfilter to decide the beginning of your paging pipeline. When syntax-highlighting, be sure to
by ttyprintk 6y ago
For a command-line relative, note that you can write a custom .lessfilter to decide the beginning of your paging pipeline. When syntax-highlighting, be sure to call less with -R.
- vermaden 6y agoThanks - I will check that out.
- madars 6y agoOne should be careful around lesspipe -- many of the tools it invokes by default have less than stellar record of handling untrusted input. https://news.ycombinator.com/item?id=8650952 https://news.ycombinator.com/item?id=8650952
- ttyprintk 6y agoThat’s a good point. I wonder if xdg-open relies on any of the same routines.
- klodolph 6y agoI've run into too many problems with .lessfilter and I've had to disable it. It's hard to write one that works on anything.
- ttyprintk 6y agoLooks like mine relies heavily on pandoc, unoconv, xxd, jq, and OpenSSL. Apparently, some packagers include an enhanced OS customization with high-risk information retrieval tools (see seclists comment). pdftotext seems reasonable and looks to be part of the Debian lessfilter.