I forgot to queue up what I figured out in 2017, so here it finally is: install [Wayback/Archive] lesspipe.sh, a preprocessor for less download | SourceForge.net and integrate it.
Thanks Matteo for pointing me into the right direction.
Getting lesspipe to run on OpenSUSE was a bit of a journey as it is not part of the standard OpenSUSE 12.x repository. You can only get ‘unstable’ lesspipe packages, of which the Show home:adra / lesspipe – openSUSE Build Service seems to be maintained most frequently.
This is how to install it from there:
zypper addrepo http://download.opensuse.org/repositories/home:adra/openSUSE_Factory/home:adra.repo
zypper refresh
zypper install lesspipe
I am using the bash shell, so after performing the install, I had to add this line to my my ~/.bashrc
LESSOPEN="|lesspipe.sh %s"; export LESSOPEN
|
Answered at [WayBack/Archive] linux – How can I have less automatically decompress xz files like it did with gz files on my old SUSE distro? – Super User
It is slightly different from the answer by [Wayback/Archive] Matteo:
The functionality is provided by lesspipe. Install it and put (I don’t have a SUSE machine at the moment to check)
[ -x /usr/bin/lessopen.sh ] && eval /usr/bin/lessopen.sh
in your shell configuration (e.g., .bashrc)
Try the one that best suits you (:
There was another comment by
[Wayback/Archive] Johan Walles prompting me to revisit this post, amend it from draft to publishable, then queue it:
Not exactly what you were asking for, but the moar pager will transparently decompress gzip, zstd, xz and bzip2, from files or stdin: github.com/walles/moar. Specifics in github.com/walles/moar/blob/master/m/zopen.go. Disclaimer: I wrote moar so of course I like it…
Since then, moar moved to moor, so on my list of things to play with is:
An initial inspection of zopen.go shows that it uses magic bytes (official file signatures) to distinguish compressed files and uncompress them on the fly.
The reason for the move was Debian: [Wayback/Archive] Merge pull request #305 from walles/johan/moor · walles/moor@ff72f13 · GitHub
Change project name to enable Debian packaging
I want to have moor in Debian (thereby getting into all the Debian derivative distros as well, Ubuntu and others).
Unfortunately, /usr/bin/moar is already used by another project (not named moar...), and Debian policy forbids having two different packages providing binaries with the same name, even with Conflicts annotations.
I believe renaming is the quickest way into Debian, and being in Debian is more important than retaining the name.
Apologies for the problems I know this will cause, but I believe this is a long term good decision.
[Wayback/Archive] Change project name to enable Debian packaging by walles · Pull Request #305 · walles/moor · GitHub
For lesspipe, see also:
--jeroen
Related
Leave a Comment