Package: less
Version: 458-3

Hello,
less uses lesspipe through the use of LESSOPEN and symlink
lessfile->lesspipe.

In case of LESSOPEN pointing to lessfile (or simply not containing "|"?),
The command is supposed to produce a file, and print the filename on stdout.

Bug: currently the filename is printed both on stdout and at the end of the
produced file
in the case of user having ~/.lessfilter

I propose the following fix; the filename is printed outside the shell
subprocess construct (), and should not be duplicated inside it.

diff --git a/debian/lesspipe b/debian/lesspipe
index e2960fd..7588692 100644
--- a/debian/lesspipe
+++ b/debian/lesspipe
@@ -64,13 +64,6 @@ if [ $# -eq 1 ] ; then
  if [ -x ~/.lessfilter ]; then
  ~/.lessfilter "$1"
  if [ $? -eq 0 ]; then
- if [ $BASENAME = $LESSFILE ]; then
- if [ -s $TMPFILE ]; then
- echo $TMPFILE
- else
- rm -f $TMPFILE
- fi
- fi
  exit 0
  fi
  fi

Reply via email to