My less does not respect the lessopen environment variable.
The less version is:
less 668 (PCRE2 regular expressions)
Copyright (C) 1984-2024 Mark Nudelman
less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Home page: https://greenwoodsoftware.com/less
$ which less
/run/current-system/sw/bin/less
$ ls -l `which less`
/run/current-system/sw/bin/less -> /nix/store/z387y1yyhx7p41q1jr2bz3yzcdna36d9-less-668/bin/less
I’ve investigated a bit further, the less IS build with (“configureFlags”,“–sysconfdir=/etc --with-regex=pcre2 --without-secure”), I don’t know exactly what --without-secure mean.
What’s not working? What’s the behavior you see, and what do you expect instead?
Also, master isn’t meant to be used directly, it’s basically the same as using nixos-unstable but you have to waste time building everything yourself.
The problem I find is that less is not using lesspipe, which made me investigate the problem and come to the conclusion that less is always in secure mode even without LESSSECURE value set.
The master thing is because I want to use some broken software(quite urgently) on unstable and the master branch fixed it, and I forgot to change it back. I may change this in the future.
As far as I see, master have most packages built, but sometimes large packages is not updated, e.g. libreoffice.
when I open up a image file(tested with .jpg, .png, .bmp) with strace less filename, the trace showed nothing about the lesspipe.sh part. It should run lesspipe.sh as a preprocessor and give me the metadata about the image, instead of asking me if I want to display a binary file.
I tried running lesspipe.sh directly on those images with lesspipe.sh $filename, and it gave me the desired output of using exiftool to capture the data from the image.
when I run less on text files with less filename and tried functionalities disabled by secure mode, it bells and tell me that the command isn’t available.
I hope these additional information can be helpful.