slackware-current/source/a/less/lesspipe.log.patch
Patrick J Volkerding 983b468de9 Thu May 23 18:47:30 UTC 2024
a/etc-15.1-x86_64-12.txz:  Rebuilt.
  Remove less related profile variables from /etc/profile.
a/exfatprogs-1.2.3-x86_64-1.txz:  Upgraded.
a/less-655-x86_64-2.txz:  Rebuilt.
  Create /etc/profile.d/less.{csh,sh} for less related profile variables.
  By default, don't display the informational messages on the top line
  of the output (this can be configured in less.{csh,sh}.
  Don't attempt special handling of .log files as it breaks viewing a file
  such as foo.log.bz2.
d/parallel-20240522-noarch-1.txz:  Upgraded.
l/python-trove-classifiers-2024.5.22-x86_64-1.txz:  Upgraded.
x/mesa-24.1.0-x86_64-1.txz:  Upgraded.
x/xterm-392-x86_64-1.txz:  Upgraded.
xap/pavucontrol-6.0-x86_64-1.txz:  Upgraded.
2024-05-23 21:28:36 +02:00

21 lines
796 B
Diff

From 355e96d89fb8ec649f4fce7650cbdd5a684035fb Mon Sep 17 00:00:00 2001
From: Patrick J. Volkerding <volkerdi@slackware.com>
Date: Thu May 23 18:30:51 UTC 2024
Subject: [PATCH] Ignore .log extension
Without this patch, a log file (which should be a text file) that is
compressed will not be uncompressed and you'll get the usual warning
from less that the content might be binary, and the log file will not
be visible. Removing the special handling for .log, everything works.
--- ./lesspipe.sh.orig 2024-05-10 13:48:19.000000000 -0500
+++ ./lesspipe.sh 2024-05-23 13:28:25.917030712 -0500
@@ -140,7 +140,7 @@
if [[ $fchar != binary ]]; then
# text only file formats
case "$fext" in
- html|htm|xml|pod|log)
+ html|htm|xml|pod)
ftype="$fext" ;;
pm)
ftype=perl ;;