Motivation
lesspipe.sh is a preprocessor for the less pager that transforms non-text files into readable text format. Several variants of such a preprocessor do exist.
Designed for versatility, this enhanced version of lesspipe intelligently identifies file types using the file command and, when needed, refines its guess through smart file extension matching. Depending on the file type, lesspipe generates clear, readable text using specialized helper tools, while built-in syntax highlighters add color and clarity for an improved viewing experience. It can effortlessly explore nested archives and reveal the contents of files buried within. With enhanced tab completion for Zsh and Bash, navigating complex archive structures becomes smooth and efficient.
The latest version is v2.24 (Apr 04 2026).
Features
lesspipe.sh enables less to display:- Compressed files (gzip, bzip2, xz, zstd, lz4, brotli, lzma, lzip, zlib, compress)
- Archive contents (tar, zip, rar, 7z, rpm, deb, dmg, ar, iso, cpio, cab, ar, appimage, snap)
- Document formats (pdf, ps, MS Office, LibreOffice, rtf, html, xml, markdown, epub, dvi, djvu)
- Media file metadata (mp3, images, video and other audio files)
- Other formats (man pages, csv, json, certificates, pgp, matlab, jupyter notebooks, netcdf, shared libraries, Java .class files, device tree blobs, MacOS property lists, colorizing log files)
- Nested hierarchies (files within archives within compressed archives, up to 6 levels deep)
Sample output