3 ms·
Ah, we've come full circle and reimplemented lesspipe[1][2]. [1]: https://manpages.debian.org/jessie/less/lesspipe.1.en.html https://manpages.debian.org/jessie
by woodruffw 7y ago
Ah, we've come full circle and reimplemented lesspipe[1][2].
[1]: https://manpages.debian.org/jessie/less/lesspipe.1.en.html https://manpages.debian.org/jessie/less/lesspipe.1.en.html
[2]: https://www.openwall.com/lists/oss-security/2014/11/23/2 https://www.openwall.com/lists/oss-security/2014/11/23/2
- escapecharacter 7y agoI can't wait until it sends email in addition to searching for it.
- gitgud 7y agoIs that a reference to [1] "Zawinski's Law of Software Envelopment"? "Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can." [1] http://www.catb.org/~esr/jargon/html/Z/Zawinskis-Law.html http://www.catb.org/~esr/jargon/html/Z/Zawinskis-Law.html
- bhaak 7y agoAre there any corollaries to Zawinski's Law? Because lately when I develop something, it always gains either IRC or RSS capabilities at some point.
- est31 7y agoThanks! This simplifies opening of compressed log files: I've been using zless but lesspipe makes it redundant.
- woodruffw 7y agoYou're welcome, but also check out that second link: I'd be careful about running lesspipe on untrusted inputs. It looks like this tool might have the same problems, given that it appears to spawn tools like poppler[1]. [1]: https://github.com/phiresky/ripgrep-all/blob/master/src/adapters/poppler.rs https://github.com/phiresky/ripgrep-all/blob/master/src/adap...
- masklinn 7y agoTBF unlike lesspipe this is an explicit invocation. In fact, this might be why the author opted to create a separate utility rather than recommend setting --pre/--pre-glob straight into the ripgrep configuration file.
- phiresky 7y agokind of.. though this tool does a lot more (caching, recursing into archives and extracting all text) and is a lot faster (for the file types it can parse, lesspipe knows more), and of course lesspipe is only indirectly usable for recursive searching. Also, most of it is completely safe Rust, so no out-of-bounds writes there :). The most dangerous part currently is probably the PDF parser.