lessfile is broken when using ~/.lessfilter

Bug #1915568 reported by ash
8
This bug affects 1 person
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
ProcVersionSignature: Ubuntu 4.15.0-135.139-generic 4.15.18
Uname: Linux 4.15.0-135-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
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~18.04
 libc6 2.27-3ubuntu1.4
 libgcc1 1:8.4.0-1ubuntu1~18.04
 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)

Revision history for this message
ash (sersorrel) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

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.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package less - 590-1

---------------
less (590-1) sid; urgency=low

  [ Milan Kupcevic ]
  * new upstream release (closes: #983599, #995984)
    - avoid spurious empty lines (closes: #763631)
    - remove erroneous free() (closes: #990035)
  * debian/lesspipe.1: list zstd related file types
  * debian/lesspipe: redo lessfilter handling
    (closes: #788438, #992354)(lp: #1915568)
  * debian/lesspipe: safeguard from possible improper delete
    (closes: #1002301)
  * refresh quilt patches
  * update copyright notice
  * set standards version to 4.6.0

  [ Adam Borowski ]
  * lesspipe: support zstd-compressed files (closes: #964930)

 -- Milan Kupcevic <email address hidden> Thu, 30 Dec 2021 01:54:19 -0500

Changed in less (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.