lessfile is broken when using ~/.lessfilter
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
less (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
If ~/.lessfilter exists and is used by lesspipe/lessfile, then lessfile will make the filename of the temporary file visible in less. The attached patch fixes this. (The filename is echoed to less after the subshell exits; trying to do it inside the subshell means it ends up looking to less like part of the file being viewed.)
To test this, you can place the following file at ~/.lessfilter:
#!/bin/sh
echo foo
exit 0
Then opening any file in less (assuming you have lessfile set up) should show "foo". The bug is that, currently, it also shows a filename from somewhere in /tmp.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: less 487-0.1
ProcVersionSign
Uname: Linux 4.15.0-135-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.9-0ubuntu7.23
Architecture: amd64
CurrentDesktop: Unity7
Date: Fri Feb 12 21:25:34 2021
Dependencies:
debianutils 4.8.4
gcc-8-base 8.4.0-1ubuntu1~
libc6 2.27-3ubuntu1.4
libgcc1 1:8.4.0-
libtinfo5 6.1-1ubuntu1.18.04
InstallationDate: Installed on 2018-08-13 (914 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
SourcePackage: less
UpgradeStatus: No upgrade log present (probably fresh install)
The attachment "fix-lessfile- with-lessfilter .patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]